summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthew Xie <mattx@google.com>2013-05-24 13:01:21 -0700
committerMatthew Xie <mattx@google.com>2013-05-24 13:25:12 -0700
commit3cedf3d57aff20e1876a5b450f41b05e975cb8e0 (patch)
treec5fa34875840792332df7f7b6616c236567247e1 /src
parent0eea1282dcb425c1ea9dc6aa08d323884a9a1655 (diff)
downloadandroid_packages_apps_Bluetooth-3cedf3d57aff20e1876a5b450f41b05e975cb8e0.tar.gz
android_packages_apps_Bluetooth-3cedf3d57aff20e1876a5b450f41b05e975cb8e0.tar.bz2
android_packages_apps_Bluetooth-3cedf3d57aff20e1876a5b450f41b05e975cb8e0.zip
Fix rssi handling as one of property change event
The rssi is encoded in one byte as int8_t in the stack. JNI code copied in high byte without proper masking. The converting is not needed. I am removing the uncessary converting. bug 9110215 Change-Id: I50628b3a3c0bcf4a33775c6b62e9febd35bdc78d
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/bluetooth/btservice/RemoteDevices.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/btservice/RemoteDevices.java b/src/com/android/bluetooth/btservice/RemoteDevices.java
index 04bc1c2fc..a60f977e6 100755
--- a/src/com/android/bluetooth/btservice/RemoteDevices.java
+++ b/src/com/android/bluetooth/btservice/RemoteDevices.java
@@ -294,7 +294,8 @@ final class RemoteDevices {
device.mDeviceType = Utils.byteArrayToInt(val);
break;
case AbstractionLayer.BT_PROPERTY_REMOTE_RSSI:
- device.mRssi = Utils.byteArrayToShort(val);
+ // RSSI from hal is in one byte
+ device.mRssi = val[0];
break;
}
}