Loading android/app/src/com/android/bluetooth/bass_client/BassClientService.java +2 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; Loading Loading @@ -399,8 +398,8 @@ public class BassClientService extends ProfileService { Log.e(TAG, "connect: device is null"); return false; } if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_UNKNOWN) { Log.e(TAG, "connect: unknown connection policy"); if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { Log.e(TAG, "connect: connection policy set to forbidden"); return false; } synchronized (mStateMachines) { Loading android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -197,14 +197,14 @@ public class BassClientServiceTest { } /** * Test connecting to a device when the connection policy is unknown. * Test connecting to a device when the connection policy is forbidden. * - service.connect() should return false. */ @Test public void testConnect_whenConnectionPolicyIsUnknown() { public void testConnect_whenConnectionPolicyIsForbidden() { when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), eq(BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT))) .thenReturn(BluetoothProfile.CONNECTION_POLICY_UNKNOWN); .thenReturn(BluetoothProfile.CONNECTION_POLICY_FORBIDDEN); mCurrentDevice = TestUtils.getTestDevice(mBluetoothAdapter, 0); assertThat(mCurrentDevice).isNotNull(); Loading Loading
android/app/src/com/android/bluetooth/bass_client/BassClientService.java +2 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; Loading Loading @@ -399,8 +398,8 @@ public class BassClientService extends ProfileService { Log.e(TAG, "connect: device is null"); return false; } if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_UNKNOWN) { Log.e(TAG, "connect: unknown connection policy"); if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { Log.e(TAG, "connect: connection policy set to forbidden"); return false; } synchronized (mStateMachines) { Loading
android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -197,14 +197,14 @@ public class BassClientServiceTest { } /** * Test connecting to a device when the connection policy is unknown. * Test connecting to a device when the connection policy is forbidden. * - service.connect() should return false. */ @Test public void testConnect_whenConnectionPolicyIsUnknown() { public void testConnect_whenConnectionPolicyIsForbidden() { when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), eq(BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT))) .thenReturn(BluetoothProfile.CONNECTION_POLICY_UNKNOWN); .thenReturn(BluetoothProfile.CONNECTION_POLICY_FORBIDDEN); mCurrentDevice = TestUtils.getTestDevice(mBluetoothAdapter, 0); assertThat(mCurrentDevice).isNotNull(); Loading