/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hfp/ |
D | HeadsetServiceTest.java | 102 private HeadsetService mHeadsetService; field in HeadsetServiceTest 171 mHeadsetService = new HeadsetService(mAdapterService, mNativeInterface); in setUp() 172 mHeadsetService.start(); in setUp() 173 mHeadsetService.setAvailable(true); in setUp() 174 verify(mObjectsFactory).makeSystemInterface(mHeadsetService); in setUp() 175 mHeadsetService.setForceScoAudio(true); in setUp() 180 mHeadsetService.stop(); in tearDown() 182 mHeadsetService = HeadsetService.getHeadsetService(); in tearDown() 183 Assert.assertNull(mHeadsetService); in tearDown() 192 Assert.assertEquals(mHeadsetService, HeadsetService.getHeadsetService()); in testGetHeadsetService() [all …]
|
D | HeadsetServiceAndStateMachineTest.java | 119 private HeadsetService mHeadsetService; field in HeadsetServiceAndStateMachineTest 181 mHeadsetService = in setUp() 183 mHeadsetService.start(); in setUp() 184 mHeadsetService.setAvailable(true); in setUp() 186 verify(mObjectsFactory).makeSystemInterface(mHeadsetService); in setUp() 197 eq(mHeadsetService.getActiveDevice())); in setUp() 204 mHeadsetService.stop(); in tearDown() 205 mHeadsetService = HeadsetService.getHeadsetService(); in tearDown() 206 assertThat(mHeadsetService).isNull(); in tearDown() 215 assertThat(HeadsetService.getHeadsetService()).isEqualTo(mHeadsetService); in testGetHeadsetService() [all …]
|
D | HeadsetStateMachineTest.java | 102 @Mock private HeadsetService mHeadsetService; field in HeadsetStateMachineTest 136 when(mHeadsetService.getContentResolver()).thenReturn(mMockContentResolver); in setUp() 140 when(mHeadsetService.bindService(any(Intent.class), any(ServiceConnection.class), anyInt())) in setUp() 142 when(mHeadsetService.getResources()) in setUp() 144 when(mHeadsetService.getPackageManager()) in setUp() 146 when(mHeadsetService.getConnectionPolicy(any(BluetoothDevice.class))) in setUp() 148 when(mHeadsetService.getForceScoAudio()).thenReturn(true); in setUp() 149 when(mHeadsetService.okToAcceptConnection(any(BluetoothDevice.class), anyBoolean())) in setUp() 151 when(mHeadsetService.isScoAcceptable(any(BluetoothDevice.class))) in setUp() 163 mHeadsetService, in setUp() [all …]
|
D | HeadsetPhoneStateTest.java | 59 @Mock private HeadsetService mHeadsetService; field in HeadsetPhoneStateTest 85 when(mHeadsetService.getSystemService(Context.TELEPHONY_SERVICE)) in setUp() 87 when(mHeadsetService.getSystemServiceName(TelephonyManager.class)) in setUp() 90 when(mHeadsetService.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)) in setUp() 92 when(mHeadsetService.getSystemServiceName(SubscriptionManager.class)) in setUp() 96 when(mHeadsetService.getStateMachinesThreadLooper()).thenReturn(mHandlerThread.getLooper()); in setUp() 97 mHeadsetPhoneState = new HeadsetPhoneState(mHeadsetService); in setUp()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/ |
D | PhonePolicyTest.java | 84 @Mock private HeadsetService mHeadsetService; field in PhonePolicyTest 99 when(mHeadsetService.connect(any(BluetoothDevice.class))).thenReturn(true); in setUp() 107 doReturn(mHeadsetService).when(mServiceFactory).getHeadsetService(); in setUp() 160 when(mHeadsetService.getConnectionPolicy(device)) in testProcessInitProfilePriorities() 231 when(mHeadsetService.getConnectionPolicy(dev)) in processInitProfilePriorities_LeAudioOnlyHelper() 325 when(mHeadsetService.getConnectionPolicy(device)) in testProcessInitProfilePriorities_WithAutoConnect() 343 verify(mHeadsetService, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) in testProcessInitProfilePriorities_WithAutoConnect() 358 verify(mHeadsetService, timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(1)) in testProcessInitProfilePriorities_LeAudioDisabledByDefault() 386 verify(mHeadsetService, timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(2)) in testProcessInitProfilePriorities_LeAudioDisabledByDefault() 417 verify(mHeadsetService, timeout(ASYNC_CALL_TIMEOUT_MILLIS).times(1)) in testProcessInitProfilePriorities_LeAudioEnabledByDefault() [all …]
|
D | AudioRoutingManagerTest.java | 105 @Mock private HeadsetService mHeadsetService; field in AudioRoutingManagerTest 129 when(mServiceFactory.getHeadsetService()).thenReturn(mHeadsetService); in setUp() 151 when(mHeadsetService.getHfpCallAudioPolicy(any())) in setUp() 153 when(mHeadsetService.setActiveDevice(any())).thenReturn(true); in setUp() 194 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 203 verify(mHeadsetService).setActiveDevice(mA2dpHeadsetDevice); in a2dpAndHfpConnectedAtTheSameTime_setA2dpActiveShouldNotBeCalled() 259 verify(mHeadsetService).setActiveDevice(mA2dpHeadsetDevice); in a2dpDeviceDisconnected_fallbackA2dpHeadset() 266 Mockito.clearInvocations(mA2dpService, mHeadsetService); in a2dpDeviceDisconnected_fallbackA2dpHeadset() 277 verify(mHeadsetService, never()).setActiveDevice(mHeadsetDevice); in onlyHeadsetConnected_setHeadsetActiveShouldNotBeCalled() 285 verify(mHeadsetService, never()).setActiveDevice(mHeadsetDevice); in secondHeadsetConnected_noDeviceActivated() [all …]
|
D | ActiveDeviceManagerTest.java | 110 @Mock private HeadsetService mHeadsetService; field in ActiveDeviceManagerTest 132 when(mServiceFactory.getHeadsetService()).thenReturn(mHeadsetService); in setUp() 155 when(mHeadsetService.getHfpCallAudioPolicy(any())) in setUp() 157 when(mHeadsetService.setActiveDevice(any())).thenReturn(true); in setUp() 186 when(mHeadsetService.getFallbackDevice()) in setUp() 229 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 241 verify(mHeadsetService).setActiveDevice(mA2dpHeadsetDevice); in a2dpAndHfpConnectedAtTheSameTime_setA2dpActiveShouldBeCalled() 301 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mHeadsetDevice); in onlyHeadsetConnected_setHeadsetActive() 308 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mHeadsetDevice); in secondHeadsetConnected_setSecondHeadsetActive() 311 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mSecondaryAudioDevice); in secondHeadsetConnected_setSecondHeadsetActive() [all …]
|
D | SilenceDeviceManagerTest.java | 65 @Mock private HeadsetService mHeadsetService; field in SilenceDeviceManagerTest 71 when(mServiceFactory.getHeadsetService()).thenReturn(mHeadsetService); in setUp() 104 doReturn(true).when(mHeadsetService).setSilenceMode(mTestDevice, enableSilence); in testSetGetDeviceSilenceConnectedCase()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/ |
D | HeadsetSystemInterface.java | 46 private final HeadsetService mHeadsetService; field in HeadsetSystemInterface 57 mHeadsetService = headsetService; in HeadsetSystemInterface() 58 mAudioManager = mHeadsetService.getSystemService(AudioManager.class); in HeadsetSystemInterface() 59 PowerManager powerManager = mHeadsetService.getSystemService(PowerManager.class); in HeadsetSystemInterface() 63 mHeadsetPhoneState = new com.android.bluetooth.hfp.HeadsetPhoneState(mHeadsetService); in HeadsetSystemInterface() 64 mTelephonyManager = mHeadsetService.getSystemService(TelephonyManager.class); in HeadsetSystemInterface() 65 mTelecomManager = mHeadsetService.getSystemService(TelecomManager.class); in HeadsetSystemInterface() 124 mHeadsetService.getHfpCallAudioPolicy(device); in answerCall() 128 mHeadsetService.setActiveDevice(device); in answerCall() 150 if (mHeadsetService.isVirtualCallStarted()) { in hangupCall() [all …]
|
D | HeadsetStateMachine.java | 126 private final HeadsetService mHeadsetService; field in HeadsetStateMachine 198 mHeadsetService = requireNonNull(headsetService); in HeadsetStateMachine() 218 mPhonebook = new AtPhonebook(mHeadsetService, mNativeInterface); in HeadsetStateMachine() 346 mHeadsetService.onConnectionStateChangedFromStateMachine(device, fromState, toState); in broadcastConnectionState() 352 mHeadsetService.sendBroadcastAsUser( in broadcastConnectionState() 371 mHeadsetService.onAudioStateChangedFromStateMachine(device, fromState, toState); in broadcastAudioState() 376 mHeadsetService.sendBroadcastAsUser( in broadcastAudioState() 515 if (!mHeadsetService.isAptXSwbEnabled()) { in setAptxVoice() 518 if (!mHeadsetService.isAptXSwbPmEnabled()) { in setAptxVoice() 521 if (mHeadsetService.isVirtualCallStarted()) { in setAptxVoice() [all …]
|
D | HeadsetPhoneState.java | 47 private final HeadsetService mHeadsetService; field in HeadsetPhoneState 78 mHeadsetService = headsetService; in HeadsetPhoneState() 79 mTelephonyManager = mHeadsetService.getSystemService(TelephonyManager.class); in HeadsetPhoneState() 83 mSubscriptionManager = SubscriptionManager.from(mHeadsetService); in HeadsetPhoneState() 279 mHeadsetService.onDeviceStateChanged( in sendDeviceStateChanged()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientStateMachineTest.java | 104 @Mock private HeadsetService mHeadsetService; field in HeadsetClientStateMachineTest 148 mHeadsetService, in setUp() 163 verifyNoMoreInteractions(mHeadsetService); in tearDown() 181 mHeadsetService, in startHeadsetClientStateMachine() 354 verify(mHeadsetService).updateInbandRinging(eq(mTestDevice), eq(true)); 404 verify(mHeadsetService).updateInbandRinging(eq(mTestDevice), eq(false)); 529 verify(mHeadsetService).updateInbandRinging(eq(mTestDevice), eq(true)); 660 verify(mHeadsetService).updateInbandRinging(eq(mTestDevice), eq(true)); 708 verify(mHeadsetService).updateInbandRinging(eq(mTestDevice), eq(true)); 1532 verify(mHeadsetService).updateInbandRinging(eq(mTestDevice), eq(false)); [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/ |
D | AdapterService.java | 300 private HeadsetService mHeadsetService; field in AdapterService 1779 if (mHeadsetService != null in isAllProfilesUnknown() 1780 && mHeadsetService.getConnectionPolicy(device) in isAllProfilesUnknown() 1876 if (mHeadsetService != null in connectEnabledProfiles() 1878 && mHeadsetService.getConnectionPolicy(device) in connectEnabledProfiles() 1881 mHeadsetService.connect(device); in connectEnabledProfiles() 1983 mHeadsetService = HeadsetService.getHeadsetService(); in initProfileServices() 4508 && mHeadsetService.getActiveDevice() != null in sendPreferredAudioProfileChangeToAudioFramework() 4509 && groupDevices.contains(mHeadsetService.getActiveDevice())) { in sendPreferredAudioProfileChangeToAudioFramework() 5094 mHeadsetService != null in setActiveDevice() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientStateMachine.java | 138 private final HeadsetService mHeadsetService; field in HeadsetClientStateMachine 890 mHeadsetService = headsetService; in HeadsetClientStateMachine() 1098 if (mHeadsetService != null && mCurrentDevice != null) { in enter() 1099 mHeadsetService.updateInbandRinging(mCurrentDevice, false); in enter() 1423 if (mHeadsetService != null) { in enter() 1424 mHeadsetService.updateInbandRinging(mCurrentDevice, true); in enter()
|