/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/storage/ |
D | DatabaseManagerTest.java | 68 private DatabaseManager mDatabaseManager; field in DatabaseManagerTest 105 mDatabaseManager = new DatabaseManager(mAdapterService); in setUp() 119 mDatabaseManager.cleanup(); in tearDown() 130 mDatabaseManager.getProfileConnectionPolicy(mTestDevice, id)); in testMetadataDefault() 134 mDatabaseManager.getA2dpSupportsOptionalCodecs(mTestDevice)); in testMetadataDefault() 137 mDatabaseManager.getA2dpOptionalCodecsEnabled(mTestDevice)); in testMetadataDefault() 140 Assert.assertNull(mDatabaseManager.getCustomMeta(mTestDevice, id)); in testMetadataDefault() 143 mDatabaseManager.factoryReset(); in testMetadataDefault() 144 mDatabaseManager.mMetadataCache.clear(); in testMetadataDefault() 146 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testMetadataDefault() [all …]
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hearingaid/ |
D | HearingAidServiceTest.java | 74 @Mock private DatabaseManager mDatabaseManager; field in HearingAidServiceTest 94 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 220 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 226 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 232 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testGetSetPriority() 286 when(mDatabaseManager.getProfileConnectionPolicy(mLeftDevice, BluetoothProfile.HEARING_AID)) in testOutgoingConnectMissingHearingAidUuid() 288 when(mDatabaseManager in testOutgoingConnectMissingHearingAidUuid() 291 when(mDatabaseManager in testOutgoingConnectMissingHearingAidUuid() 314 when(mDatabaseManager in testOutgoingConnectPriorityOff() 328 when(mDatabaseManager in testOutgoingConnectTimeout() [all …]
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/ |
D | PhonePolicyTest.java | 67 @Mock private DatabaseManager mDatabaseManager; field in PhonePolicyTest 79 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 118 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in testProcessInitProfilePriorities() 130 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) in testProcessInitProfilePriorities() 133 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) in testProcessInitProfilePriorities() 152 when(mDatabaseManager.getMostRecentlyConnectedA2dpDevice()).thenReturn(bondedDevice); in testAdapterOnAutoConnect() 187 when(mDatabaseManager.getMostRecentlyConnectedA2dpDevice()).thenReturn( in testDisconnectNoAutoConnect() 207 verify(mDatabaseManager, timeout(ASYNC_CALL_TIMEOUT_MILLIS)).setConnection( in testDisconnectNoAutoConnect() 209 verify(mDatabaseManager, never()).setConnection(eq(connectionOrder.get(1)), anyBoolean()); in testDisconnectNoAutoConnect() 210 verify(mDatabaseManager, never()).setConnection(eq(connectionOrder.get(2)), anyBoolean()); in testDisconnectNoAutoConnect() [all …]
|
D | ProfileServiceTest.java | 85 @Mock private DatabaseManager mDatabaseManager; field in ProfileServiceTest 105 doReturn(mDatabaseManager).when(mMockAdapterService).getDatabase(); in setUp()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dp/ |
D | A2dpServiceTest.java | 78 @Mock private DatabaseManager mDatabaseManager; field in A2dpServiceTest 97 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 263 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 269 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 275 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testGetPriority() 330 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectMissingAudioSinkUuid() 352 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectPriorityOff() 365 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectTimeout() 395 when(mDatabaseManager.getProfileConnectionPolicy(mTestDevice, BluetoothProfile.A2DP)) in testOutgoingConnectDisconnectSuccess() 465 when(mDatabaseManager.getProfileConnectionPolicy(testDevice, BluetoothProfile.A2DP)) in testMaxConnectDevices() [all …]
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/ |
D | HeadsetServiceTest.java | 84 @Mock private DatabaseManager mDatabaseManager; field in HeadsetServiceTest 113 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 234 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectDevice_connectDeviceBelowLimit() 346 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectDevice_connectDeviceAboveLimit() 398 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_withOneDevice() 450 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_withMultipleDevices() 526 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_connectTwoAudioChannelsShouldFail() 598 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_firstConnectedAudioDevice() 665 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testConnectAudio_deviceDisconnected() 722 when(mDatabaseManager.getProfileConnectionPolicy(any(BluetoothDevice.class), in testPhoneStateChange_oneDeviceSaveState() [all …]
|
D | HeadsetServiceAndStateMachineTest.java | 151 @Mock private DatabaseManager mDatabaseManager; field in HeadsetServiceAndStateMachineTest 170 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 282 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HEADSET)) in testConnectFromApi() 325 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HEADSET)) in testUnbondDevice_disconnectBeforeUnbond() 368 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HEADSET)) in testUnbondDevice_disconnectAfterUnbond() 1153 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HEADSET)) in connectTestDevice()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/ |
D | PhonePolicy.java | 91 private DatabaseManager mDatabaseManager; field in PhonePolicy 248 mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), in PhonePolicy() 326 mDatabaseManager.setDisconnection(device); in processProfileStateChanged() 343 mDatabaseManager.setConnection(device, profileId == BluetoothProfile.A2DP); in processActiveDeviceChanged() 349 mDatabaseManager.setConnection(device, false); in processDeviceConnected() 405 mDatabaseManager.getMostRecentlyConnectedA2dpDevice(); in autoConnect()
|
D | AdapterService.java | 223 private DatabaseManager mDatabaseManager; field in AdapterService 462 mDatabaseManager = new DatabaseManager(this); in onCreate() 463 mDatabaseManager.start(MetadataDatabase.createDatabase(this)); in onCreate() 727 if (mDatabaseManager != null) { in cleanup() 728 mDatabaseManager.cleanup(); in cleanup() 1361 return service.mDatabaseManager.getMostRecentlyConnectedDevices(); in getMostRecentlyConnectedDevices() 1894 if (service.mDatabaseManager != null) { in factoryReset() 1895 service.mDatabaseManager.factoryReset(); in factoryReset() 2097 return service.mDatabaseManager.setCustomMeta(device, key, value); in setMetadata() 2107 return service.mDatabaseManager.getCustomMeta(device, key); in getMetadata() [all …]
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkServiceTest.java | 55 @Mock private DatabaseManager mDatabaseManager; field in A2dpSinkServiceTest 64 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp() 95 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.A2DP_SINK)) in mockDevicePriority()
|
/packages/apps/Bluetooth/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() 145 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HID_HOST)) in testOkToConnectCase()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkService.java | 50 private DatabaseManager mDatabaseManager; field in A2dpSinkService 65 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start() 399 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.A2DP_SINK, in setConnectionPolicy() 420 return mDatabaseManager in getConnectionPolicy()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/ |
D | A2dpService.java | 68 private DatabaseManager mDatabaseManager; field in A2dpService 119 mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), in start() 649 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.A2DP, in setConnectionPolicy() 674 return mDatabaseManager in getConnectionPolicy() 842 return mDatabaseManager.getA2dpSupportsOptionalCodecs(device); in getSupportsOptionalCodecs() 849 mDatabaseManager.setA2dpSupportsOptionalCodecs(device, value); in setSupportsOptionalCodecs() 863 return mDatabaseManager.getA2dpOptionalCodecsEnabled(device); in getOptionalCodecsEnabled() 884 mDatabaseManager.setA2dpOptionalCodecsEnabled(device, value); in setOptionalCodecsEnabled()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/mapclient/ |
D | MapClientTest.java | 60 @Mock private DatabaseManager mDatabaseManager; field in MapClientTest 71 when(mAdapterService.getDatabase()).thenReturn(mDatabaseManager); in setUp() 97 when(mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.MAP_CLIENT)) in mockDevicePriority()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/pbapclient/ |
D | PbapClientService.java | 65 private DatabaseManager mDatabaseManager; field in PbapClientService 78 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start() 458 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.PBAP_CLIENT, in setConnectionPolicy() 488 return mDatabaseManager in getConnectionPolicy()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/map/ |
D | BluetoothMapServiceTest.java | 53 @Mock private DatabaseManager mDatabaseManager; field in BluetoothMapServiceTest 62 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pbapclient/ |
D | PbapClientServiceTest.java | 54 @Mock private DatabaseManager mDatabaseManager; field in PbapClientServiceTest 63 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientServiceTest.java | 55 @Mock private DatabaseManager mDatabaseManager; field in HeadsetClientServiceTest 64 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapServiceTest.java | 53 @Mock private DatabaseManager mDatabaseManager; field in BluetoothPbapServiceTest 62 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/mapclient/ |
D | MapClientService.java | 63 private DatabaseManager mDatabaseManager; field in MapClientService 250 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.MAP_CLIENT, in setConnectionPolicy() 277 return mDatabaseManager in getConnectionPolicy() 297 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pan/ |
D | PanServiceTest.java | 56 @Mock private DatabaseManager mDatabaseManager; field in PanServiceTest 66 doReturn(mDatabaseManager).when(mAdapterService).getDatabase(); in setUp()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapService.java | 143 private DatabaseManager mDatabaseManager; field in BluetoothPbapService 496 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.PBAP, in setConnectionPolicy() 523 return mDatabaseManager in getConnectionPolicy() 559 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/pan/ |
D | PanService.java | 77 private DatabaseManager mDatabaseManager; field in PanService 120 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start() 446 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.PAN, in setConnectionPolicy() 472 return mDatabaseManager in getConnectionPolicy()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/ |
D | HearingAidService.java | 64 private DatabaseManager mDatabaseManager; field in HearingAidService 110 mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), in start() 491 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.HEARING_AID, in setConnectionPolicy() 518 return mDatabaseManager in getConnectionPolicy()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/hid/ |
D | HidDeviceService.java | 71 private DatabaseManager mDatabaseManager; field in HidDeviceService 671 if (!mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.HID_DEVICE, in setConnectionPolicy() 699 return mDatabaseManager in getConnectionPolicy() 728 mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), in start()
|