From 366f4139cbdf90baf022f167ddb5f508c11f854a Mon Sep 17 00:00:00 2001 From: Alexandros Schillings Date: Sat, 15 Mar 2014 21:27:15 +0000 Subject: [PATCH] Exposed timestamp --- .../bluetoothlelib/device/BluetoothLeDevice.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/library/src/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java b/library/src/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java index 34fad65..0130a17 100644 --- a/library/src/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java +++ b/library/src/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java @@ -40,6 +40,10 @@ public class BluetoothLeDevice implements Parcelable{ return new BluetoothLeDevice[size]; } }; + + public BluetoothLeDevice(BluetoothDevice device, int rssi, byte[] scanRecord){ + this(device, rssi, scanRecord, 0); + } public BluetoothLeDevice(BluetoothDevice device, int rssi, byte[] scanRecord, long timestamp){ mDevice = device; @@ -49,10 +53,6 @@ public class BluetoothLeDevice implements Parcelable{ mTimestamp = timestamp; } - public BluetoothLeDevice(BluetoothDevice device, int rssi, byte[] scanRecord){ - this(device, rssi, scanRecord, 0); - } - private BluetoothLeDevice(Parcel in) { final Bundle b = in.readBundle(getClass().getClassLoader()); @@ -119,6 +119,10 @@ public class BluetoothLeDevice implements Parcelable{ return mScanRecord; } + public long getTimestamp(){ + return mTimestamp; + } + @Override public int hashCode() { final int prime = 31;