OSDN Git Service

Use nanos instead of micros in BLE scan.
authorWei Wang <weiwa@google.com>
Mon, 11 Aug 2014 17:42:10 +0000 (10:42 -0700)
committerWei Wang <weiwa@google.com>
Mon, 11 Aug 2014 17:42:58 +0000 (10:42 -0700)
Change-Id: Ifdaf101f92ae4c8d2bcecf62a1942961d6610151

src/com/android/bluetooth/gatt/GattService.java

index 2e4615f..2ee7e4e 100644 (file)
@@ -575,10 +575,8 @@ public class GattService extends ProfileService {
                 if (app != null) {
                     BluetoothDevice device = BluetoothAdapter.getDefaultAdapter()
                             .getRemoteDevice(address);
-                    long scanTimeNanos =
-                            TimeUnit.NANOSECONDS.toMicros(SystemClock.elapsedRealtimeNanos());
                     ScanResult result = new ScanResult(device, ScanRecord.parseFromBytes(adv_data),
-                            rssi, scanTimeNanos);
+                            rssi, SystemClock.elapsedRealtimeNanos());
                     if (matchesFilters(client, result)) {
                         try {
                             ScanSettings settings = client.settings;