Searched refs:mHeadsetService (Results 1 - 9 of 9) sorted by relevance

/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/
H A DHeadsetServiceTest.java71 private HeadsetService mHeadsetService; field in class:HeadsetServiceTest
143 mHeadsetService = HeadsetService.getHeadsetService();
144 Assert.assertNotNull(mHeadsetService);
145 verify(mObjectsFactory).makeSystemInterface(mHeadsetService);
147 mHeadsetServiceBinder = (IBluetoothHeadset.Stub) mHeadsetService.initBinder();
158 mHeadsetService = HeadsetService.getHeadsetService();
159 Assert.assertNull(mHeadsetService);
174 Assert.assertEquals(mHeadsetService, HeadsetService.getHeadsetService());
178 mHeadsetService.getConnectionState(mCurrentDevice));
180 mHeadsetService
[all...]
H A DHeadsetServiceAndStateMachineTest.java92 private HeadsetService mHeadsetService; field in class:HeadsetServiceAndStateMachineTest
217 mHeadsetService = HeadsetService.getHeadsetService();
218 Assert.assertNotNull(mHeadsetService);
219 verify(mObjectsFactory).makeSystemInterface(mHeadsetService);
222 mHeadsetServiceBinder = (IBluetoothHeadset.Stub) mHeadsetService.initBinder();
243 mHeadsetService = HeadsetService.getHeadsetService();
244 Assert.assertNull(mHeadsetService);
262 Assert.assertEquals(mHeadsetService, HeadsetService.getHeadsetService());
266 mHeadsetService.getConnectionState(device));
268 mHeadsetService
[all...]
H A DHeadsetStateMachineTest.java74 @Mock private HeadsetService mHeadsetService; field in class:HeadsetStateMachineTest
105 when(mHeadsetService.getContentResolver()).thenReturn(mMockContentResolver);
108 when(mHeadsetService.bindService(any(Intent.class), any(ServiceConnection.class), anyInt()))
110 when(mHeadsetService.getResources()).thenReturn(
112 when(mHeadsetService.getPackageManager()).thenReturn(
114 when(mHeadsetService.getPriority(any(BluetoothDevice.class))).thenReturn(
116 when(mHeadsetService.getForceScoAudio()).thenReturn(true);
117 when(mHeadsetService.okToAcceptConnection(any(BluetoothDevice.class))).thenReturn(true);
118 when(mHeadsetService.isScoAcceptable(any(BluetoothDevice.class))).thenReturn(true);
125 .makeStateMachine(mTestDevice, mHandlerThread.getLooper(), mHeadsetService,
[all...]
H A DHeadsetPhoneStateTest.java53 @Mock private HeadsetService mHeadsetService; field in class:HeadsetPhoneStateTest
73 when(mHeadsetService.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(
75 when(mHeadsetService.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)).thenReturn(
79 when(mHeadsetService.getStateMachinesThreadLooper()).thenReturn(mHandlerThread.getLooper());
80 mHeadsetPhoneState = new HeadsetPhoneState(mHeadsetService);
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
H A DPhonePolicyTest.java63 @Mock private HeadsetService mHeadsetService; field in class:PhonePolicyTest
70 when(mHeadsetService.connect(any(BluetoothDevice.class))).thenReturn(true);
77 doReturn(mHeadsetService).when(mServiceFactory).getHeadsetService();
107 when(mHeadsetService.getPriority(device)).thenReturn(BluetoothProfile.PRIORITY_UNDEFINED);
122 verify(mHeadsetService, timeout(ASYNC_CALL_TIMEOUT_MILLIS)).setPriority(eq(device),
146 when(mHeadsetService.getPriority(bondedDevices[0])).thenReturn(
158 verify(mHeadsetService, timeout(ASYNC_CALL_TIMEOUT_MILLIS)).connect(eq(bondedDevices[0]));
180 when(mHeadsetService.getPriority(bondedDevices[0])).thenReturn(
182 when(mHeadsetService.getPriority(bondedDevices[1])).thenReturn(
184 when(mHeadsetService
[all...]
H A DActiveDeviceManagerTest.java64 @Mock private HeadsetService mHeadsetService; field in class:ActiveDeviceManagerTest
81 when(mServiceFactory.getHeadsetService()).thenReturn(mHeadsetService);
84 when(mHeadsetService.setActiveDevice(any())).thenReturn(true);
168 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mHeadsetDevice);
177 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mHeadsetDevice);
180 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice);
189 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mHeadsetDevice);
192 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(isNull());
201 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mHeadsetDevice);
204 verify(mHeadsetService, timeou
[all...]
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
H A DHeadsetSystemInterface.java44 private final HeadsetService mHeadsetService; field in class:HeadsetSystemInterface
75 mHeadsetService = headsetService;
76 mAudioManager = (AudioManager) mHeadsetService.getSystemService(Context.AUDIO_SERVICE);
78 (PowerManager) mHeadsetService.getSystemService(Context.POWER_SERVICE);
82 mHeadsetPhoneState = new HeadsetPhoneState(mHeadsetService);
91 intent.setComponent(intent.resolveSystemService(mHeadsetService.getPackageManager(), 0));
92 if (intent.getComponent() == null || !mHeadsetService.bindService(intent,
109 mHeadsetService.unbindService(mPhoneProxyConnection);
159 mHeadsetService.setActiveDevice(device);
182 if (mHeadsetService
[all...]
H A DHeadsetPhoneState.java52 private final HeadsetService mHeadsetService; field in class:HeadsetPhoneState
82 mHeadsetService = headsetService;
84 (TelephonyManager) mHeadsetService.getSystemService(Context.TELEPHONY_SERVICE);
88 mSubscriptionManager = SubscriptionManager.from(mHeadsetService);
164 mHeadsetService.getStateMachinesThreadLooper());
257 mHeadsetService.onDeviceStateChanged(
306 mHeadsetService.registerReceiver(new BroadcastReceiver() {
316 mHeadsetService.unregisterReceiver(this);
H A DHeadsetStateMachine.java123 private final HeadsetService mHeadsetService; field in class:HeadsetStateMachine
167 mHeadsetService = Objects.requireNonNull(headsetService, "headsetService cannot be null");
174 mPhonebook = new AtPhonebook(mHeadsetService, mNativeInterface);
289 mHeadsetService.onConnectionStateChangedFromStateMachine(device, fromState, toState);
295 mHeadsetService.sendBroadcastAsUser(intent, UserHandle.ALL,
302 mHeadsetService.onAudioStateChangedFromStateMachine(device, fromState, toState);
307 mHeadsetService.sendBroadcastAsUser(intent, UserHandle.ALL,
437 getHandler().post(() -> mHeadsetService.removeStateMachine(mDevice));
504 if (mHeadsetService.okToAcceptConnection(mDevice)) {
508 stateLogI("rejected incoming HF, priority=" + mHeadsetService
[all...]

Completed in 1248 milliseconds