gtbs: Fix sending notification on CallControl point
With this patch we make sure that, there is only one notification sent
on that characteristic.
Issue was visible sometimes on failing unit tests:
org.mockito.exceptions.verification.TooManyActualInvocations:
org.mockito.exceptions.verification.TooManyActualInvocations:
mMockGattServer.notifyCharacteristicChanged(
00:01:02:03:04:00,
com.android.bluetooth.tbs.TbsGatt$CallControlPointCharacteristic@35269cd,
false
);
Wanted 1 time:
-> at com.android.bluetooth.tbs.TbsGattTest.testSetCallControlPointResult(TbsGattTest.java:468)
But was 2 times:
-> at com.android.bluetooth.tbs.TbsGatt$BluetoothGattCharacteristicNotifier.notifyCharacteristicChanged(TbsGatt.java:284)
-> at com.android.bluetooth.tbs.TbsGatt$BluetoothGattCharacteristicNotifier.notifyCharacteristicChanged(TbsGatt.java:284)
at com.android.bluetooth.tbs.TbsGattTest.testSetCallControlPointResult(TbsGattTest.java:468)
Bug: 150670922
Test: atest TbsGattTest
Sponsor: @jpawlowski
Change-Id: I22645bf2a7cb3714d76b3d9159df347d9eaddfea
Loading
Please register or sign in to comment