diff options
author | Wei Wang <weiwa@google.com> | 2014-12-08 11:26:49 -0800 |
---|---|---|
committer | Wei Wang <weiwa@google.com> | 2014-12-08 11:27:06 -0800 |
commit | 4bb5e13f2902dc78048ede782996e78e7314afd5 (patch) | |
tree | 7748f1739464de8c196db428e66afa195e8bce44 /src/com/android/bluetooth | |
parent | c493bf3669d606a18604d201ac52617e65da4958 (diff) | |
download | android_packages_apps_Bluetooth-4bb5e13f2902dc78048ede782996e78e7314afd5.tar.gz android_packages_apps_Bluetooth-4bb5e13f2902dc78048ede782996e78e7314afd5.tar.bz2 android_packages_apps_Bluetooth-4bb5e13f2902dc78048ede782996e78e7314afd5.zip |
Fix timestamp parsing issue for full scan results.
Bug:18663523
Change-Id: If0ba083125d75e857072519fc7d6226a4db0273a
Diffstat (limited to 'src/com/android/bluetooth')
-rw-r--r-- | src/com/android/bluetooth/gatt/GattService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/gatt/GattService.java b/src/com/android/bluetooth/gatt/GattService.java index 9347b24a7..19e22d585 100644 --- a/src/com/android/bluetooth/gatt/GattService.java +++ b/src/com/android/bluetooth/gatt/GattService.java @@ -1057,6 +1057,7 @@ public class GattService extends ProfileService { Log.d(TAG, "Batch record : " + Arrays.toString(batchRecord)); Set<ScanResult> results = new HashSet<ScanResult>(numRecords); int position = 0; + long now = SystemClock.elapsedRealtimeNanos(); while (position < batchRecord.length) { byte[] address = extractBytes(batchRecord, position, 6); // TODO: remove temp hack. @@ -1068,7 +1069,7 @@ public class GattService extends ProfileService { // Skip tx power level. position++; int rssi = batchRecord[position++]; - long timestampNanos = parseTimestampNanos(extractBytes(batchRecord, position, 2)); + long timestampNanos = now - parseTimestampNanos(extractBytes(batchRecord, position, 2)); position += 2; // Combine advertise packet and scan response packet. |