/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/ |
D | DatabaseManagerTest.java | 83 private DatabaseManager mDatabaseManager; field in DatabaseManagerTest 130 mDatabaseManager = new DatabaseManager(mAdapterService); in setUp() 143 mDatabaseManager.cleanup(); in tearDown() 155 mDatabaseManager.getProfileConnectionPolicy(mTestDevice, id)); in testMetadataDefault() 160 mDatabaseManager.getA2dpSupportsOptionalCodecs(mTestDevice)); in testMetadataDefault() 164 mDatabaseManager.getA2dpOptionalCodecsEnabled(mTestDevice)); in testMetadataDefault() 167 Assert.assertNull(mDatabaseManager.getCustomMeta(mTestDevice, id)); in testMetadataDefault() 170 mDatabaseManager.factoryReset(); in testMetadataDefault() 171 mDatabaseManager.mMetadataCache.clear(); in testMetadataDefault() 173 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testMetadataDefault() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hearingaid/ |
D | HearingAidServiceTest.java | 100 @Mock private DatabaseManager mDatabaseManager; field in HearingAidServiceTest 132 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 217 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 223 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 228 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 302 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testOutgoingConnectMissingHearingAidUuid() 304 when(mDatabaseManager.getProfileConnectionPolicy( in testOutgoingConnectMissingHearingAidUuid() 307 when(mDatabaseManager.getProfileConnectionPolicy( in testOutgoingConnectMissingHearingAidUuid() 329 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testOutgoingConnectPriorityOff() 340 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testOutgoingConnectTimeout() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/bas/ |
D | BatteryServiceTest.java | 61 @Mock private DatabaseManager mDatabaseManager; field in BatteryServiceTest 73 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 116 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.BATTERY)) in testGetSetPolicy() 123 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.BATTERY)) in testGetSetPolicy() 130 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.BATTERY)) in testGetSetPolicy() 142 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.BATTERY)) in testGetPolicyAfterStopped() 216 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testConnectAndDump() 217 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.BATTERY)) in testConnectAndDump() 234 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testForbiddenPolicy_FailsToConnect() 235 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.BATTERY)) in testForbiddenPolicy_FailsToConnect() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/ |
D | PhonePolicyTest.java | 87 @Mock private DatabaseManager mDatabaseManager; field in PhonePolicyTest 105 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 167 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testProcessInitProfilePriorities() 176 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) in testProcessInitProfilePriorities() 181 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) in testProcessInitProfilePriorities() 248 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in processInitProfilePriorities_LeAudioOnlyHelper() 332 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testProcessInitProfilePriorities_WithAutoConnect() 363 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(1)) in testProcessInitProfilePriorities_LeAudioDisabledByDefault() 368 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(1)) in testProcessInitProfilePriorities_LeAudioDisabledByDefault() 371 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(1)) in testProcessInitProfilePriorities_LeAudioDisabledByDefault() [all …]
|
D | AudioRoutingManagerTest.java | 95 private TestDatabaseManager mDatabaseManager; field in AudioRoutingManagerTest 122 mDatabaseManager = new TestDatabaseManager(mAdapterService); in setUp() 127 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in setUp() 973 mDatabaseManager.setProfileConnectionPolicy( in dualModeAudioDeviceConnected_withDualModeFeatureEnabled() 977 mDatabaseManager.setProfileConnectionPolicy( in dualModeAudioDeviceConnected_withDualModeFeatureEnabled() 1137 mDatabaseManager.setProfileConnectionPolicy( in a2dpConnected() 1139 mDatabaseManager.setProfileConnectionPolicy( in a2dpConnected() 1189 mDatabaseManager.setProfileConnectionPolicy( in headsetConnected() 1191 mDatabaseManager.setProfileConnectionPolicy( in headsetConnected() 1241 mDatabaseManager.setProfileConnectionPolicy( in hearingAidConnected() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/vc/ |
D | VolumeControlServiceTest.java | 93 @Mock private DatabaseManager mDatabaseManager; field in VolumeControlServiceTest 111 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 234 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetSetPolicy() 235 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.VOLUME_CONTROL)) in testGetSetPolicy() 242 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetSetPolicy() 243 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.VOLUME_CONTROL)) in testGetSetPolicy() 250 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetSetPolicy() 251 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.VOLUME_CONTROL)) in testGetSetPolicy() 263 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.VOLUME_CONTROL)) in testGetPolicyAfterStopped() 338 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testOutgoingConnectMissingVolumeControlUuid() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/csip/ |
D | CsipSetCoordinatorServiceTest.java | 80 @Mock private DatabaseManager mDatabaseManager; field in CsipSetCoordinatorServiceTest 97 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 192 when(mDatabaseManager.getProfileConnectionPolicy( in testGetSetPolicy() 200 when(mDatabaseManager.getProfileConnectionPolicy( in testGetSetPolicy() 208 when(mDatabaseManager.getProfileConnectionPolicy( in testGetSetPolicy() 221 when(mDatabaseManager.getProfileConnectionPolicy( in testGetPolicyAfterStopped() 383 when(mDatabaseManager.getProfileConnectionPolicy( in testOutgoingConnectMissingUuid() 402 when(mDatabaseManager.getProfileConnectionPolicy( in testOutgoingConnectExistingUuid() 429 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/hfp/ |
D | HeadsetServiceTest.java | 86 @Mock private DatabaseManager mDatabaseManager; field in HeadsetServiceTest 126 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 276 when(mDatabaseManager.getProfileConnectionPolicy( in testConnectDevice_connectDeviceBelowLimit() 415 when(mDatabaseManager.getProfileConnectionPolicy( in testConnectDevice_connectDeviceAboveLimit() 486 when(mDatabaseManager.getProfileConnectionPolicy( in testConnectAudio_withOneDevice() 551 when(mDatabaseManager.getProfileConnectionPolicy( in testConnectAudio_withMultipleDevices() 652 when(mDatabaseManager.getProfileConnectionPolicy( in testConnectAudio_connectTwoAudioChannelsShouldFail() 747 when(mDatabaseManager.getProfileConnectionPolicy( in testConnectAudio_firstConnectedAudioDevice() 837 when(mDatabaseManager.getProfileConnectionPolicy( in testConnectAudio_deviceDisconnected() 910 when(mDatabaseManager.getProfileConnectionPolicy( in testPhoneStateChange_oneDeviceSaveState() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/sap/ |
D | SapServiceTest.java | 56 @Mock private DatabaseManager mDatabaseManager; field in SapServiceTest 101 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testGetConnectionPolicy() 102 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.SAP)) in testGetConnectionPolicy() 107 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.SAP)) in testGetConnectionPolicy() 112 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.SAP)) in testGetConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dp/ |
D | A2dpServiceTest.java | 91 @Mock private DatabaseManager mDatabaseManager; field in A2dpServiceTest 126 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 198 when(mDatabaseManager.getProfileConnectionPolicy(sTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 203 when(mDatabaseManager.getProfileConnectionPolicy(sTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 208 when(mDatabaseManager.getProfileConnectionPolicy(sTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 280 when(mDatabaseManager.getProfileConnectionPolicy(sTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectMissingAudioSinkUuid() 301 when(mDatabaseManager.getProfileConnectionPolicy(sTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectPriorityOff() 312 when(mDatabaseManager.getProfileConnectionPolicy(sTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectTimeout() 348 when(mDatabaseManager.getProfileConnectionPolicy(sTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectDisconnectSuccess() 426 when(mDatabaseManager.getProfileConnectionPolicy(testDevice, BluetoothProfile.A2DP)) in testMaxConnectDevices() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkServiceTest.java | 64 @Mock private DatabaseManager mDatabaseManager; field in A2dpSinkServiceTest 96 doReturn(true).when(mDatabaseManager).setProfileConnectionPolicy(any(), anyInt(), anyInt()); in setUp() 98 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 146 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.A2DP_SINK)) in mockDevicePriority() 390 verify(mDatabaseManager) in testSetConnectionPolicyDeviceAllowed() 404 verify(mDatabaseManager) in testSetConnectionPolicyDeviceForbiddenWhileNotConnected() 424 verify(mDatabaseManager) in testSetConnectionPolicyDeviceForbiddenWhileConnected() 445 verify(mDatabaseManager) in testSetConnectionPolicyDeviceUnknown() 455 when(mDatabaseManager.setProfileConnectionPolicy(any(), anyInt(), anyInt())) in testSetConnectionPolicyDatabaseWriteFails()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pan/ |
D | PanServiceTest.java | 65 @Mock private DatabaseManager mDatabaseManager; field in PanServiceTest 73 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 177 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy_whenDatabaseManagerRefuses_returnsFalse() 186 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy_returnsTrue() 196 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy_returnsTrue()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/mapclient/ |
D | MapClientServiceTest.java | 62 @Mock private DatabaseManager mDatabaseManager; field in MapClientServiceTest 73 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 125 when(mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy() 135 when(mDatabaseManager.getProfileConnectionPolicy( in getConnectionPolicy() 145 when(mDatabaseManager.getProfileConnectionPolicy( in connect_whenPolicyIsForbidden_returnsFalse() 155 when(mDatabaseManager.getProfileConnectionPolicy( in connect_whenPolicyIsAllowed_returnsTrue() 261 when(mDatabaseManager.getProfileConnectionPolicy( in disconnect_doesNotCleanUpNewStateMachineOfSameDevice()
|
D | MapClientTest.java | 65 @Mock private DatabaseManager mDatabaseManager; field in MapClientTest 72 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/le_audio/ |
D | LeAudioServiceTest.java | 131 @Mock private DatabaseManager mDatabaseManager; field in LeAudioServiceTest 201 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 400 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testGetSetPriority() 406 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testGetSetPriority() 412 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testGetSetPriority() 430 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.LE_AUDIO)) in testOkToConnectCase() 501 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testOutgoingConnectMissingLeAudioUuid() 503 when(mDatabaseManager.getProfileConnectionPolicy(mRightDevice, BluetoothProfile.LE_AUDIO)) in testOutgoingConnectMissingLeAudioUuid() 505 when(mDatabaseManager.getProfileConnectionPolicy(mSingleDevice, BluetoothProfile.LE_AUDIO)) in testOutgoingConnectMissingLeAudioUuid() 526 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.LE_AUDIO)) in testOutgoingConnectPriorityOff() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbapclient/ |
D | PbapClientServiceTest.java | 74 @Mock private DatabaseManager mDatabaseManager; field in PbapClientServiceTest 81 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 141 when(mDatabaseManager.setProfileConnectionPolicy( in testSetConnectionPolicy() 156 when(mDatabaseManager.getProfileConnectionPolicy( in testGetConnectionPolicy() 171 when(mDatabaseManager.getProfileConnectionPolicy( in testConnect_whenPolicyIsForbidden_returnsFalse() 181 when(mDatabaseManager.getProfileConnectionPolicy( in testConnect_whenPolicyIsAllowed_returnsTrue()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hap/ |
D | HapClientTest.java | 107 @Mock private DatabaseManager mDatabaseManager; field in HapClientTest 122 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 192 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 242 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.HAP_CLIENT)) in testGetSetPolicy() 249 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.HAP_CLIENT)) in testGetSetPolicy() 256 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.HAP_CLIENT)) in testGetSetPolicy() 270 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.HAP_CLIENT)) in testGetPolicyAfterStopped() 344 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.HAP_CLIENT)) in testOutgoingConnectMissingHasUuid() 362 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.HAP_CLIENT)) in testOutgoingConnectExistingHasUuid() 384 when(mDatabaseManager.getProfileConnectionPolicy(mDevice, BluetoothProfile.HAP_CLIENT)) in testOutgoingConnectPolicyForbidden() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hid/ |
D | HidHostServiceTest.java | 53 @Mock private DatabaseManager mDatabaseManager; field in HidHostServiceTest 58 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 165 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HID_HOST)) in testOkToConnectCase()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/ |
D | PhonePolicy.java | 88 private DatabaseManager mDatabaseManager; field in PhonePolicy 178 mDatabaseManager = Objects.requireNonNull(service.getDatabase()); in PhonePolicy() 729 mDatabaseManager.setDisconnection(device, profileId); in processProfileStateChanged() 757 mDatabaseManager.setConnection(device, profileId); in processActiveDeviceChanged() 803 mDatabaseManager.setConnection(device); in processDeviceConnected() 878 mDatabaseManager.getMostRecentlyConnectedA2dpDevice(); in autoConnect() 897 mDatabaseManager.getMostRecentlyActiveHfpDevices(); in autoConnect() 911 mDatabaseManager.getMostRecentlyActiveHfpDevice(); in autoConnect()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapServiceTest.java | 71 @Mock private DatabaseManager mDatabaseManager; field in BluetoothPbapServiceTest 84 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 142 verify(mDatabaseManager).getProfileConnectionPolicy(mRemoteDevice, BluetoothProfile.PBAP); in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkService.java | 72 private DatabaseManager mDatabaseManager; field in A2dpSinkService 97 mDatabaseManager = in start() 466 if (!mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy() 488 return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.A2DP_SINK); in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/bas/ |
D | BatteryService.java | 61 private DatabaseManager mDatabaseManager; field in BatteryService 90 mDatabaseManager = in start() 380 mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy() 395 return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.BATTERY); in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbapclient/ |
D | PbapClientService.java | 78 private DatabaseManager mDatabaseManager; field in PbapClientService 145 mDatabaseManager = in start() 625 if (!mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy() 654 return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.PBAP_CLIENT); in getConnectionPolicy()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/map/ |
D | BluetoothMapServiceTest.java | 70 @Mock private DatabaseManager mDatabaseManager; field in BluetoothMapServiceTest 76 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/ |
D | A2dpService.java | 92 private final DatabaseManager mDatabaseManager; field in A2dpService 134 mDatabaseManager = requireNonNull(mAdapterService.getDatabase()); in A2dpService() 676 if (!mDatabaseManager.setProfileConnectionPolicy( in setConnectionPolicy() 699 return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.A2DP); in getConnectionPolicy() 844 return mDatabaseManager.getA2dpSupportsOptionalCodecs(device); in getSupportsOptionalCodecs() 852 mDatabaseManager.setA2dpSupportsOptionalCodecs(device, value); in setSupportsOptionalCodecs() 865 return mDatabaseManager.getA2dpOptionalCodecsEnabled(device); in getOptionalCodecsEnabled() 885 mDatabaseManager.setA2dpOptionalCodecsEnabled(device, value); in setOptionalCodecsEnabled()
|