Loading android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -91,17 +91,6 @@ static int get_properties(int num_properties, bt_property_t *properties, jintArr jobjectArray *props) { jbyteArray propVal; for (int i = 0; i < num_properties; i++) { /* The higher layers expect rssi as a short int value, while the value is sent as a byte * to jni. Converting rssi value to the expected format.*/ if (properties[i].type == BT_PROPERTY_REMOTE_RSSI) { jbyte rssi = *((jbyte *) properties[i].val); short rssiValue = rssi; properties[i].len = sizeof(rssiValue); properties[i].val = &rssiValue; } propVal = callbackEnv->NewByteArray(properties[i].len); if (propVal == NULL) goto Fail; Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; } } Loading Loading
android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -91,17 +91,6 @@ static int get_properties(int num_properties, bt_property_t *properties, jintArr jobjectArray *props) { jbyteArray propVal; for (int i = 0; i < num_properties; i++) { /* The higher layers expect rssi as a short int value, while the value is sent as a byte * to jni. Converting rssi value to the expected format.*/ if (properties[i].type == BT_PROPERTY_REMOTE_RSSI) { jbyte rssi = *((jbyte *) properties[i].val); short rssiValue = rssi; properties[i].len = sizeof(rssiValue); properties[i].val = &rssiValue; } propVal = callbackEnv->NewByteArray(properties[i].len); if (propVal == NULL) goto Fail; Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; } } Loading