/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/ |
D | DatabaseManagerTest.java | 69 private DatabaseManager mDatabaseManager; field in DatabaseManagerTest 106 mDatabaseManager = new DatabaseManager(mAdapterService); in setUp() 120 mDatabaseManager.cleanup(); in tearDown() 131 mDatabaseManager.getProfileConnectionPolicy(mTestDevice, id)); in testMetadataDefault() 135 mDatabaseManager.getA2dpSupportsOptionalCodecs(mTestDevice)); in testMetadataDefault() 138 mDatabaseManager.getA2dpOptionalCodecsEnabled(mTestDevice)); in testMetadataDefault() 141 Assert.assertNull(mDatabaseManager.getCustomMeta(mTestDevice, id)); in testMetadataDefault() 144 mDatabaseManager.factoryReset(); in testMetadataDefault() 145 mDatabaseManager.mMetadataCache.clear(); in testMetadataDefault() 147 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testMetadataDefault() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hearingaid/ |
D | HearingAidServiceTest.java | 82 @Mock private DatabaseManager mDatabaseManager; field in HearingAidServiceTest 99 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 229 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 240 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 246 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 300 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testOutgoingConnectMissingHearingAidUuid() 302 when(mDatabaseManager in testOutgoingConnectMissingHearingAidUuid() 305 when(mDatabaseManager in testOutgoingConnectMissingHearingAidUuid() 328 when(mDatabaseManager in testOutgoingConnectPriorityOff() 346 when(mDatabaseManager in testOutgoingConnectTimeout() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/bas/ |
D | BatteryServiceTest.java | 66 @Mock private DatabaseManager mDatabaseManager; field in BatteryServiceTest 83 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 133 when(mDatabaseManager in testGetSetPolicy() 140 when(mDatabaseManager in testGetSetPolicy() 147 when(mDatabaseManager in testGetSetPolicy() 161 when(mDatabaseManager in testGetPolicyAfterStopped() 216 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testConnectAndDump() 217 when(mDatabaseManager in testConnectAndDump() 236 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testForbiddenPolicy_FailsToConnect() 237 when(mDatabaseManager in testForbiddenPolicy_FailsToConnect() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/vc/ |
D | VolumeControlServiceTest.java | 90 @Mock private DatabaseManager mDatabaseManager; field in VolumeControlServiceTest 109 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 249 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetSetPolicy() 250 when(mDatabaseManager in testGetSetPolicy() 257 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetSetPolicy() 258 when(mDatabaseManager in testGetSetPolicy() 265 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetSetPolicy() 266 when(mDatabaseManager in testGetSetPolicy() 280 when(mDatabaseManager in testGetPolicyAfterStopped() 339 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testOutgoingConnectMissingVolumeControlUuid() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/ |
D | PhonePolicyTest.java | 70 @Mock private DatabaseManager mDatabaseManager; field in PhonePolicyTest 82 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 123 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testProcessInitProfilePriorities() 135 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) in testProcessInitProfilePriorities() 138 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) in testProcessInitProfilePriorities() 157 when(mDatabaseManager.getMostRecentlyConnectedA2dpDevice()).thenReturn(bondedDevice); in testAdapterOnAutoConnect() 192 when(mDatabaseManager.getMostRecentlyConnectedA2dpDevice()).thenReturn( in testDisconnectNoAutoConnect() 213 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)).setConnection( in testDisconnectNoAutoConnect() 215 verify(mDatabaseManager, never()).setConnection(eq(connectionOrder.get(1)), anyBoolean()); in testDisconnectNoAutoConnect() 216 verify(mDatabaseManager, never()).setConnection(eq(connectionOrder.get(2)), anyBoolean()); in testDisconnectNoAutoConnect() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/csip/ |
D | CsipSetCoordinatorServiceTest.java | 76 @Mock private DatabaseManager mDatabaseManager; field in CsipSetCoordinatorServiceTest 96 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 203 when(mDatabaseManager.getProfileConnectionPolicy( in testGetSetPolicy() 209 when(mDatabaseManager.getProfileConnectionPolicy( in testGetSetPolicy() 216 when(mDatabaseManager.getProfileConnectionPolicy( in testGetSetPolicy() 230 when(mDatabaseManager in testGetPolicyAfterStopped() 379 when(mDatabaseManager.getProfileConnectionPolicy( in testOutgoingConnectMissingUuid() 400 when(mDatabaseManager.getProfileConnectionPolicy( in testOutgoingConnectExistingUuid() 427 when(mDatabaseManager.getProfileConnectionPolicy( in testOutgoingConnectPolicyForbidden() 441 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testOutgoingConnectTimeout() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dp/ |
D | A2dpServiceTest.java | 79 @Mock private DatabaseManager mDatabaseManager; field in A2dpServiceTest 98 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 262 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 268 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 274 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 329 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectMissingAudioSinkUuid() 351 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectPriorityOff() 364 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectTimeout() 394 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectDisconnectSuccess() 464 when(mDatabaseManager.getProfileConnectionPolicy(testDevice, BluetoothProfile.A2DP)) in testMaxConnectDevices() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hfp/ |
D | HeadsetServiceTest.java | 85 @Mock private DatabaseManager mDatabaseManager; field in HeadsetServiceTest 114 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 236 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectDevice_connectDeviceBelowLimit() 348 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectDevice_connectDeviceAboveLimit() 400 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_withOneDevice() 456 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_withMultipleDevices() 537 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_connectTwoAudioChannelsShouldFail() 613 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_firstConnectedAudioDevice() 681 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_deviceDisconnected() 742 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testPhoneStateChange_oneDeviceSaveState() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/le_audio/ |
D | LeAudioServiceTest.java | 116 @Mock private DatabaseManager mDatabaseManager; field in LeAudioServiceTest 181 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 349 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testGetSetPriority() 355 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testGetSetPriority() 361 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testGetSetPriority() 379 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.LE_AUDIO)) in testOkToConnectCase() 431 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testOutgoingConnectMissingLeAudioUuid() 433 when(mDatabaseManager in testOutgoingConnectMissingLeAudioUuid() 436 when(mDatabaseManager in testOutgoingConnectMissingLeAudioUuid() 459 when(mDatabaseManager in testOutgoingConnectPriorityOff() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkServiceTest.java | 62 @Mock private DatabaseManager mDatabaseManager; field in A2dpSinkServiceTest 94 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 97 when(mDatabaseManager.setProfileConnectionPolicy(any(), anyInt(), in setUp() 156 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.A2DP_SINK)) in mockDevicePriority() 412 verify(mDatabaseManager, times(1)).setProfileConnectionPolicy(mDevice1, in testSetConnectionPolicyDeviceAllowed() 423 verify(mDatabaseManager, times(1)).setProfileConnectionPolicy(mDevice1, in testSetConnectionPolicyDeviceForbiddenWhileNotConnected() 438 verify(mDatabaseManager, times(1)).setProfileConnectionPolicy(mDevice1, in testSetConnectionPolicyDeviceForbiddenWhileConnected() 453 verify(mDatabaseManager, times(1)).setProfileConnectionPolicy(mDevice1, in testSetConnectionPolicyDeviceUnknown() 462 when(mDatabaseManager.setProfileConnectionPolicy(any(), anyInt(), in testSetConnectionPolicyDatabaseWriteFails()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/sap/ |
D | SapServiceTest.java | 64 @Mock private DatabaseManager mDatabaseManager; field in SapServiceTest 129 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetConnectionPolicy() 130 when(mDatabaseManager in testGetConnectionPolicy() 136 when(mDatabaseManager in testGetConnectionPolicy() 142 when(mDatabaseManager in testGetConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pan/ |
D | PanServiceTest.java | 65 @Mock private DatabaseManager mDatabaseManager; field in PanServiceTest 74 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 166 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy_whenDatabaseManagerRefuses_returnsFalse() 174 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy_returnsTrue() 180 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy_returnsTrue()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/mapclient/ |
D | MapClientServiceTest.java | 61 @Mock private DatabaseManager mDatabaseManager; field in MapClientServiceTest 73 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 122 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy() 131 when(mDatabaseManager.getProfileConnectionPolicy( in getConnectionPolicy() 140 when(mDatabaseManager.getProfileConnectionPolicy( in connect_whenPolicyIsForbidden_returnsFalse() 149 when(mDatabaseManager.getProfileConnectionPolicy( in connect_whenPolicyIsAllowed_returnsTrue()
|
D | MapClientTest.java | 63 @Mock private DatabaseManager mDatabaseManager; field in MapClientTest 74 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in setUp() 101 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.MAP_CLIENT)) in mockDevicePriority()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hap/ |
D | HapClientTest.java | 105 private DatabaseManager mDatabaseManager; field in HapClientTest 134 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 206 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 286 when(mDatabaseManager in testGetSetPolicy() 293 when(mDatabaseManager in testGetSetPolicy() 300 when(mDatabaseManager in testGetSetPolicy() 319 when(mDatabaseManager in testGetPolicyAfterStopped() 374 when(mDatabaseManager in testOutgoingConnectMissingHasUuid() 394 when(mDatabaseManager in testOutgoingConnectExistingHasUuid() 416 when(mDatabaseManager in testOutgoingConnectPolicyForbidden() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbapclient/ |
D | PbapClientServiceTest.java | 74 @Mock private DatabaseManager mDatabaseManager; field in PbapClientServiceTest 83 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 138 when(mDatabaseManager.setProfileConnectionPolicy( in testSetConnectionPolicy() 152 when(mDatabaseManager.getProfileConnectionPolicy( in testGetConnectionPolicy() 166 when(mDatabaseManager.getProfileConnectionPolicy( in testConnect_whenPolicyIsForbidden_returnsFalse() 175 when(mDatabaseManager.getProfileConnectionPolicy( in testConnect_whenPolicyIsAllowed_returnsTrue()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hid/ |
D | HidHostServiceTest.java | 56 @Mock private DatabaseManager mDatabaseManager; field in HidHostServiceTest 65 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in setUp() 152 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HID_HOST)) in testOkToConnectCase()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapServiceTest.java | 63 @Mock private DatabaseManager mDatabaseManager; field in BluetoothPbapServiceTest 71 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 125 verify(mDatabaseManager).getProfileConnectionPolicy(mRemoteDevice, BluetoothProfile.PBAP); in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/ |
D | PhonePolicy.java | 105 private DatabaseManager mDatabaseManager; field in PhonePolicy 289 mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), in PhonePolicy() 455 mDatabaseManager.setDisconnection(device); in processProfileStateChanged() 475 mDatabaseManager.setConnection(device, profileId == BluetoothProfile.A2DP); in processActiveDeviceChanged() 505 mDatabaseManager.setConnection(device, false); in processDeviceConnected() 576 mDatabaseManager.getMostRecentlyConnectedA2dpDevice(); in autoConnect()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkService.java | 53 private DatabaseManager mDatabaseManager; field in A2dpSinkService 75 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start() 520 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.A2DP_SINK, in setConnectionPolicy() 542 return mDatabaseManager in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/bas/ |
D | BatteryService.java | 66 private DatabaseManager mDatabaseManager; field in BatteryService 99 mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), in start() 403 mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.BATTERY, in setConnectionPolicy() 420 return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.BATTERY); in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/ |
D | A2dpService.java | 80 private DatabaseManager mDatabaseManager; field in A2dpService 137 mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), in start() 675 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.A2DP, in setConnectionPolicy() 700 return mDatabaseManager in getConnectionPolicy() 864 return mDatabaseManager.getA2dpSupportsOptionalCodecs(device); in getSupportsOptionalCodecs() 870 mDatabaseManager.setA2dpSupportsOptionalCodecs(device, value); in setSupportsOptionalCodecs() 883 return mDatabaseManager.getA2dpOptionalCodecsEnabled(device); in getOptionalCodecsEnabled() 903 mDatabaseManager.setA2dpOptionalCodecsEnabled(device, value); in setOptionalCodecsEnabled()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbapclient/ |
D | PbapClientService.java | 82 private DatabaseManager mDatabaseManager; field in PbapClientService 133 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start() 601 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.PBAP_CLIENT, in setConnectionPolicy() 632 return mDatabaseManager in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/bass_client/ |
D | BassClientServiceTest.java | 144 @Mock private DatabaseManager mDatabaseManager; field in BassClientServiceTest 216 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 315 when(mDatabaseManager in testGetPolicyAfterStopped() 331 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnect() 350 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnect_nullDevice() 364 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnect_whenConnectionPolicyIsForbidden() 399 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in prepareConnectedDeviceGroup()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientServiceTest.java | 71 @Mock private DatabaseManager mDatabaseManager; field in HeadsetClientServiceTest 80 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp()
|