Loading android/app/src/com/android/bluetooth/tbs/TbsGatt.java +15 −2 Original line number Diff line number Diff line Loading @@ -586,7 +586,7 @@ public class TbsGatt { } public void notify(BluetoothDevice device) { if (isNotifiable()) { if (isNotifiable() && super.getValue() != null) { mNotifier.notify(device, this); } } Loading Loading @@ -1363,6 +1363,10 @@ public class TbsGatt { : (auth == BluetoothDevice.ACCESS_REJECTED ? "REJECTED" : "UNKNOWN"))); processPendingGattOperations(device); if (auth != BluetoothDevice.ACCESS_ALLOWED) { return; } BluetoothGattService gattService = mBluetoothGattServer.getService(UUID_GTBS); if (gattService != null) { List<BluetoothGattCharacteristic> characteristics = gattService.getCharacteristics(); Loading @@ -1370,11 +1374,20 @@ public class TbsGatt { GattCharacteristic wrapper = getLocalCharacteristicWrapper(characteristic.getUuid()); if (wrapper != null) { /* Value of status flags is not keep in the characteristic but in the * mStatusFlagValue */ if (characteristic.getUuid().equals(UUID_STATUS_FLAGS)) { if (mStatusFlagValue.containsKey(device)) { updateStatusFlags(device, mStatusFlagValue.get(device)); } } else { wrapper.notify(device); } } } } } private void clearUnauthorizedGattOperationss(BluetoothDevice device) { if (DBG) { Loading android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGattTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -866,7 +866,7 @@ public class TbsGattTest { verify(mMockGattServer, times(0)) .notifyCharacteristicChanged(any(), eq(characteristic2), eq(false)); verify(mMockGattServer, times(1)) .notifyCharacteristicChanged(any(), eq(characteristic), eq(false)); .notifyCharacteristicChanged(any(), eq(characteristic), eq(false), eq(valueBytes)); } @Test Loading Loading
android/app/src/com/android/bluetooth/tbs/TbsGatt.java +15 −2 Original line number Diff line number Diff line Loading @@ -586,7 +586,7 @@ public class TbsGatt { } public void notify(BluetoothDevice device) { if (isNotifiable()) { if (isNotifiable() && super.getValue() != null) { mNotifier.notify(device, this); } } Loading Loading @@ -1363,6 +1363,10 @@ public class TbsGatt { : (auth == BluetoothDevice.ACCESS_REJECTED ? "REJECTED" : "UNKNOWN"))); processPendingGattOperations(device); if (auth != BluetoothDevice.ACCESS_ALLOWED) { return; } BluetoothGattService gattService = mBluetoothGattServer.getService(UUID_GTBS); if (gattService != null) { List<BluetoothGattCharacteristic> characteristics = gattService.getCharacteristics(); Loading @@ -1370,11 +1374,20 @@ public class TbsGatt { GattCharacteristic wrapper = getLocalCharacteristicWrapper(characteristic.getUuid()); if (wrapper != null) { /* Value of status flags is not keep in the characteristic but in the * mStatusFlagValue */ if (characteristic.getUuid().equals(UUID_STATUS_FLAGS)) { if (mStatusFlagValue.containsKey(device)) { updateStatusFlags(device, mStatusFlagValue.get(device)); } } else { wrapper.notify(device); } } } } } private void clearUnauthorizedGattOperationss(BluetoothDevice device) { if (DBG) { Loading
android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGattTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -866,7 +866,7 @@ public class TbsGattTest { verify(mMockGattServer, times(0)) .notifyCharacteristicChanged(any(), eq(characteristic2), eq(false)); verify(mMockGattServer, times(1)) .notifyCharacteristicChanged(any(), eq(characteristic), eq(false)); .notifyCharacteristicChanged(any(), eq(characteristic), eq(false), eq(valueBytes)); } @Test Loading