Loading android/app/src/com/android/bluetooth/le_audio/LeAudioTmapGattServer.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -84,10 +84,11 @@ public class LeAudioTmapGattServer { new BluetoothGattService(BluetoothUuid.TMAP.getUuid(), new BluetoothGattService(BluetoothUuid.TMAP.getUuid(), BluetoothGattService.SERVICE_TYPE_PRIMARY); BluetoothGattService.SERVICE_TYPE_PRIMARY); BluetoothGattCharacteristic characteristic = new BluetoothGattCharacteristic( BluetoothGattCharacteristic characteristic = new BluetoothGattCharacteristic( UUID_TMAP_ROLE, UUID_TMAP_ROLE, BluetoothGattCharacteristic.PROPERTY_READ, BluetoothGattCharacteristic.PROPERTY_READ, BluetoothGattCharacteristic.PERMISSION_READ_ENCRYPTED); BluetoothGattCharacteristic.PERMISSION_READ); characteristic.setValue(roleMask, BluetoothGattCharacteristic.FORMAT_UINT16, 0); characteristic.setValue(roleMask, BluetoothGattCharacteristic.FORMAT_UINT16, 0); service.addCharacteristic(characteristic); service.addCharacteristic(characteristic); Loading android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioTmapGattServerTest.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.bluetooth.le_audio; package com.android.bluetooth.le_audio; import static android.bluetooth.BluetoothGattCharacteristic.FORMAT_UINT16; import static android.bluetooth.BluetoothGattCharacteristic.FORMAT_UINT16; import static android.bluetooth.BluetoothGattCharacteristic.PERMISSION_READ_ENCRYPTED; import static android.bluetooth.BluetoothGattCharacteristic.PERMISSION_READ; import static android.bluetooth.BluetoothGattCharacteristic.PROPERTY_READ; import static android.bluetooth.BluetoothGattCharacteristic.PROPERTY_READ; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat; Loading Loading @@ -86,7 +86,7 @@ public class LeAudioTmapGattServerTest { service.getCharacteristic(LeAudioTmapGattServer.UUID_TMAP_ROLE); service.getCharacteristic(LeAudioTmapGattServer.UUID_TMAP_ROLE); assertThat(characteristic).isNotNull(); assertThat(characteristic).isNotNull(); assertThat(characteristic.getProperties()).isEqualTo(PROPERTY_READ); assertThat(characteristic.getProperties()).isEqualTo(PROPERTY_READ); assertThat(characteristic.getPermissions()).isEqualTo(PERMISSION_READ_ENCRYPTED); assertThat(characteristic.getPermissions()).isEqualTo(PERMISSION_READ); // verify characteristic value // verify characteristic value int value = characteristic.getIntValue(FORMAT_UINT16, 0); int value = characteristic.getIntValue(FORMAT_UINT16, 0); Loading Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioTmapGattServer.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -84,10 +84,11 @@ public class LeAudioTmapGattServer { new BluetoothGattService(BluetoothUuid.TMAP.getUuid(), new BluetoothGattService(BluetoothUuid.TMAP.getUuid(), BluetoothGattService.SERVICE_TYPE_PRIMARY); BluetoothGattService.SERVICE_TYPE_PRIMARY); BluetoothGattCharacteristic characteristic = new BluetoothGattCharacteristic( BluetoothGattCharacteristic characteristic = new BluetoothGattCharacteristic( UUID_TMAP_ROLE, UUID_TMAP_ROLE, BluetoothGattCharacteristic.PROPERTY_READ, BluetoothGattCharacteristic.PROPERTY_READ, BluetoothGattCharacteristic.PERMISSION_READ_ENCRYPTED); BluetoothGattCharacteristic.PERMISSION_READ); characteristic.setValue(roleMask, BluetoothGattCharacteristic.FORMAT_UINT16, 0); characteristic.setValue(roleMask, BluetoothGattCharacteristic.FORMAT_UINT16, 0); service.addCharacteristic(characteristic); service.addCharacteristic(characteristic); Loading
android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioTmapGattServerTest.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.bluetooth.le_audio; package com.android.bluetooth.le_audio; import static android.bluetooth.BluetoothGattCharacteristic.FORMAT_UINT16; import static android.bluetooth.BluetoothGattCharacteristic.FORMAT_UINT16; import static android.bluetooth.BluetoothGattCharacteristic.PERMISSION_READ_ENCRYPTED; import static android.bluetooth.BluetoothGattCharacteristic.PERMISSION_READ; import static android.bluetooth.BluetoothGattCharacteristic.PROPERTY_READ; import static android.bluetooth.BluetoothGattCharacteristic.PROPERTY_READ; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat; Loading Loading @@ -86,7 +86,7 @@ public class LeAudioTmapGattServerTest { service.getCharacteristic(LeAudioTmapGattServer.UUID_TMAP_ROLE); service.getCharacteristic(LeAudioTmapGattServer.UUID_TMAP_ROLE); assertThat(characteristic).isNotNull(); assertThat(characteristic).isNotNull(); assertThat(characteristic.getProperties()).isEqualTo(PROPERTY_READ); assertThat(characteristic.getProperties()).isEqualTo(PROPERTY_READ); assertThat(characteristic.getPermissions()).isEqualTo(PERMISSION_READ_ENCRYPTED); assertThat(characteristic.getPermissions()).isEqualTo(PERMISSION_READ); // verify characteristic value // verify characteristic value int value = characteristic.getIntValue(FORMAT_UINT16, 0); int value = characteristic.getIntValue(FORMAT_UINT16, 0); Loading