Home
last modified time | relevance | path

Searched refs:sm (Results 1 – 25 of 62) sorted by relevance

123

/packages/apps/Bluetooth/src/com/android/bluetooth/hfpclient/
DHeadsetClientService.java130 HeadsetClientStateMachine sm = in stop() local
132 sm.doQuit(); in stop()
172 for (HeadsetClientStateMachine sm : mStateMachineMap.values()) {
173 if (sm != null) {
174 sm.sendMessage(HeadsetClientStateMachine.SET_SPEAKER_VOLUME,
470 HeadsetClientStateMachine sm = getStateMachine(device); in connect() local
471 if (sm == null) { in connect()
481 sm.sendMessage(HeadsetClientStateMachine.CONNECT, device); in connect()
487 HeadsetClientStateMachine sm = getStateMachine(device); in disconnect() local
488 if (sm == null) { in disconnect()
[all …]
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DBluetoothRouteManagerTest.java77 BluetoothRouteManager sm = setupStateMachine( in testConnectHfpRetryWhileNotConnected() local
83 executeRoutingAction(sm, BluetoothRouteManager.CONNECT_HFP, DEVICE1.getAddress()); in testConnectHfpRetryWhileNotConnected()
86 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testConnectHfpRetryWhileNotConnected()
87 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testConnectHfpRetryWhileNotConnected()
88 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testConnectHfpRetryWhileNotConnected()
89 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testConnectHfpRetryWhileNotConnected()
91 assertEquals(BluetoothRouteManager.AUDIO_OFF_STATE_NAME, sm.getCurrentState().getName()); in testConnectHfpRetryWhileNotConnected()
92 sm.getHandler().removeMessages(BluetoothRouteManager.CONNECTION_TIMEOUT); in testConnectHfpRetryWhileNotConnected()
93 sm.quitNow(); in testConnectHfpRetryWhileNotConnected()
99 BluetoothRouteManager sm = setupStateMachine( in testAmbiguousActiveDevice() local
[all …]
DCallAudioModeStateMachineTest.java59 CallAudioModeStateMachine sm = new CallAudioModeStateMachine(mSystemStateHelper, in testNoFocusWhenRingerSilenced() local
61 sm.setCallAudioManager(mCallAudioManager); in testNoFocusWhenRingerSilenced()
62 sm.sendMessage(CallAudioModeStateMachine.ABANDON_FOCUS_FOR_TESTING); in testNoFocusWhenRingerSilenced()
63 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testNoFocusWhenRingerSilenced()
68 sm.sendMessage(CallAudioModeStateMachine.NEW_RINGING_CALL, in testNoFocusWhenRingerSilenced()
77 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testNoFocusWhenRingerSilenced()
79 assertEquals(CallAudioModeStateMachine.RING_STATE_NAME, sm.getCurrentStateName()); in testNoFocusWhenRingerSilenced()
92 CallAudioModeStateMachine sm = new CallAudioModeStateMachine(mSystemStateHelper, in testNoRingWhenDeviceIsAtEar() local
94 sm.setCallAudioManager(mCallAudioManager); in testNoRingWhenDeviceIsAtEar()
95 sm.sendMessage(CallAudioModeStateMachine.ABANDON_FOCUS_FOR_TESTING); in testNoRingWhenDeviceIsAtEar()
[all …]
DBluetoothRouteTransitionTests.java256 BluetoothRouteManager sm = setupStateMachine( in testTransitions() local
261 sm.setActiveDeviceCacheForTesting(mParams.activeDevice, in testTransitions()
269 sm.sendMessage(BluetoothRouteManager.BT_AUDIO_LOST, args); in testTransitions()
276 sm.onDeviceAdded(mParams.messageDevice.getAddress()); in testTransitions()
277 sm.onActiveDeviceChanged(mParams.messageDevice, in testTransitions()
280 sm.onActiveDeviceChanged(null, in testTransitions()
287 sm.onDeviceLost(mParams.messageDevice.getAddress()); in testTransitions()
289 executeRoutingAction(sm, mParams.messageType, in testTransitions()
293 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testTransitions()
294 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testTransitions()
[all …]
DCallAudioModeTransitionTests.java119 CallAudioModeStateMachine sm = new CallAudioModeStateMachine(mSystemStateHelper, in modeTransitionTest() local
121 sm.setCallAudioManager(mCallAudioManager); in modeTransitionTest()
122 sm.sendMessage(mParams.initialAudioState); in modeTransitionTest()
123 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in modeTransitionTest()
128 sm.sendMessage(mParams.messageType, mParams.externalState); in modeTransitionTest()
129 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in modeTransitionTest()
131 assertEquals(mParams.expectedFinalStateName, sm.getCurrentStateName()); in modeTransitionTest()
182 sm.quitNow(); in modeTransitionTest()
DCallAudioRouteTransitionTests.java188 private void setupMocksForParams(final CallAudioRouteStateMachine sm, in setupMocksForParams() argument
205 sm.sendMessageWithSessionInfo(CallAudioRouteStateMachine.BT_AUDIO_CONNECTED); in setupMocksForParams()
214 private void sendActionToStateMachine(CallAudioRouteStateMachine sm) { in sendActionToStateMachine() argument
217 sm.sendMessageWithSessionInfo( in sendActionToStateMachine()
219 sm.sendMessageWithSessionInfo( in sendActionToStateMachine()
223 sm.sendMessageWithSessionInfo( in sendActionToStateMachine()
225 sm.sendMessageWithSessionInfo( in sendActionToStateMachine()
229 sm.sendMessageWithSessionInfo(mParams.action); in sendActionToStateMachine()
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/
DA2dpService.java182 for (A2dpStateMachine sm : mStateMachines.values()) { in stop()
183 sm.doQuit(); in stop()
184 sm.cleanup(); in stop()
279 A2dpStateMachine sm = mStateMachines.get(device); in disconnect() local
280 if (sm == null) { in disconnect()
284 sm.sendMessage(A2dpStateMachine.DISCONNECT); in disconnect()
293 for (A2dpStateMachine sm : mStateMachines.values()) { in getConnectedDevices()
294 if (sm.isConnected()) { in getConnectedDevices()
295 devices.add(sm.getDevice()); in getConnectedDevices()
313 for (A2dpStateMachine sm : mStateMachines.values()) { in connectionAllowedCheckMaxDevices()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/
DHearingAidService.java168 for (HearingAidStateMachine sm : mStateMachines.values()) { in stop()
169 sm.doQuit(); in stop()
170 sm.cleanup(); in stop()
268 HearingAidStateMachine sm = getOrCreateStateMachine(storedDevice); in connect() local
269 if (sm == null) { in connect()
273 sm.sendMessage(HearingAidStateMachine.CONNECT); in connect()
299 HearingAidStateMachine sm = mStateMachines.get(storedDevice); in disconnect() local
300 if (sm == null) { in disconnect()
305 sm.sendMessage(HearingAidStateMachine.DISCONNECT); in disconnect()
320 for (HearingAidStateMachine sm : mStateMachines.values()) { in getConnectedDevices()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/pbap/
DBluetoothPbapService.java209 PbapStateMachine sm = mPbapStateMachineMap.get(device); in parseIntent() local
210 if (sm == null) { in parseIntent()
214 mSessionStatusHandler.removeMessages(USER_TIMEOUT, sm); in parseIntent()
227 sm.sendMessage(PbapStateMachine.AUTHORIZED); in parseIntent()
235 sm.sendMessage(PbapStateMachine.REJECTED); in parseIntent()
242 PbapStateMachine sm = mPbapStateMachineMap.get(device); in parseIntent() local
243 if (sm == null) { in parseIntent()
246 Message msg = sm.obtainMessage(PbapStateMachine.AUTH_KEY_INPUT, sessionKey); in parseIntent()
247 sm.sendMessage(msg); in parseIntent()
252 PbapStateMachine sm = mPbapStateMachineMap.get(device); in parseIntent() local
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DSystemStateHelper.java105 SensorManager sm = context.getSystemService(SensorManager.class); in isDeviceAtEar() local
106 if (sm == null) { in isDeviceAtEar()
109 Sensor grav = sm.getDefaultSensor(Sensor.TYPE_GRAVITY); in isDeviceAtEar()
110 Sensor proximity = sm.getDefaultSensor(Sensor.TYPE_PROXIMITY); in isDeviceAtEar()
155 sm.registerListener(listener, grav, SensorManager.SENSOR_DELAY_FASTEST); in isDeviceAtEar()
156 sm.registerListener(listener, proximity, SensorManager.SENSOR_DELAY_FASTEST); in isDeviceAtEar()
169 sm.unregisterListener(listener); in isDeviceAtEar()
/packages/apps/Settings/src/com/android/settings/deviceinfo/
DStorageDashboardFragment.java87 StorageManager sm = activity.getSystemService(StorageManager.class); in onCreate() local
88 mVolume = Utils.maybeInitializeVolume(sm, getArguments()); in onCreate()
191 StorageManager sm = context.getSystemService(StorageManager.class); in createPreferenceControllers() local
193 mVolume, new StorageManagerVolumeProvider(sm)); in createPreferenceControllers()
239 final StorageManager sm = context.getSystemService(StorageManager.class);
244 null /* volume */, new StorageManagerVolumeProvider(sm)));
376 StorageManager sm = context.getSystemService(StorageManager.class); in onCreateLoader() local
377 StorageManagerVolumeProvider smvp = new StorageManagerVolumeProvider(sm); in onCreateLoader()
DStorageProfileFragment.java66 final StorageManager sm = context.getSystemService(StorageManager.class); in onCreate() local
67 mVolume = Utils.maybeInitializeVolume(sm, args); in onCreate()
102 final StorageManager sm = context.getSystemService(StorageManager.class); in createPreferenceControllers() local
108 new StorageManagerVolumeProvider(sm), in createPreferenceControllers()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/
DStorageDashboardFragment.java87 StorageManager sm = activity.getSystemService(StorageManager.class); in onCreate() local
88 mVolume = Utils.maybeInitializeVolume(sm, getArguments()); in onCreate()
191 StorageManager sm = context.getSystemService(StorageManager.class); in createPreferenceControllers() local
193 mVolume, new StorageManagerVolumeProvider(sm)); in createPreferenceControllers()
239 final StorageManager sm = context.getSystemService(StorageManager.class);
244 null /* volume */, new StorageManagerVolumeProvider(sm)));
376 StorageManager sm = context.getSystemService(StorageManager.class); in onCreateLoader() local
377 StorageManagerVolumeProvider smvp = new StorageManagerVolumeProvider(sm); in onCreateLoader()
DStorageProfileFragment.java66 final StorageManager sm = context.getSystemService(StorageManager.class); in onCreate() local
67 mVolume = Utils.maybeInitializeVolume(sm, args); in onCreate()
102 final StorageManager sm = context.getSystemService(StorageManager.class); in createPreferenceControllers() local
108 new StorageManagerVolumeProvider(sm), in createPreferenceControllers()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/
DSaveState.java96 StateMachine sm = ViewModelProviders in onSuccess() local
98 sm.getListener().onComplete(StateMachine.RESULT_SUCCESS); in onSuccess()
106 StateMachine sm = ViewModelProviders in onFailure() local
108 sm.getListener().onComplete(StateMachine.RESULT_FAILURE); in onFailure()
/packages/apps/Settings/src/com/android/settings/shortcut/
DShortcutsUpdateTask.java44 ShortcutManager sm = mContext.getSystemService(ShortcutManager.class); in doInBackground() local
48 for (ShortcutInfo info : sm.getPinnedShortcuts()) { in doInBackground()
62 sm.updateShortcuts(updates); in doInBackground()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/shortcut/
DShortcutsUpdateTask.java44 ShortcutManager sm = mContext.getSystemService(ShortcutManager.class); in doInBackground() local
48 for (ShortcutInfo info : sm.getPinnedShortcuts()) { in doInBackground()
62 sm.updateShortcuts(updates); in doInBackground()
/packages/apps/Launcher3/tests/src/com/android/launcher3/testcomponent/
DRequestPinItemActivity.java65 ShortcutManager sm = getSystemService(ShortcutManager.class); in pinShortcut() local
68 int r = sm.getIconMaxWidth() / 2; in pinShortcut()
81 sm.requestPinShortcut(info, callback); in pinShortcut()
/packages/apps/Stk/src/com/android/stk/
DStkMenuConfig.java115 SubscriptionManager sm = (SubscriptionManager) mContext.getSystemService( in findConfig() local
117 SubscriptionInfo info = (sm != null) ? sm.getActiveSubscriptionInfoForSimSlotIndex(slotId) in findConfig()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageUtils.java34 public static VolumeInfo maybeInitializeVolume(StorageManager sm, @Nullable Bundle bundle) { in maybeInitializeVolume() argument
41 VolumeInfo volume = sm.findVolumeById(volumeId); in maybeInitializeVolume()
DStorageFileCategoryPreferenceController.java42 StorageManager sm = context.getSystemService(StorageManager.class); in StorageFileCategoryPreferenceController() local
43 mStorageVolumeProvider = new StorageManagerVolumeProvider(sm); in StorageFileCategoryPreferenceController()
DStorageSettingsFragment.java49 StorageManager sm = context.getSystemService(StorageManager.class); in onAttach() local
50 VolumeInfo volume = maybeInitializeVolume(sm, getArguments()); in onAttach()
DStorageOtherCategoryDetailFragment.java47 StorageManager sm = context.getSystemService(StorageManager.class); in onAttach() local
48 VolumeInfo volume = maybeInitializeVolume(sm, getArguments()); in onAttach()
/packages/apps/Bluetooth/jni/
Dpermission_helpers.cc76 sp<IServiceManager> sm = defaultServiceManager(); in isCallerActiveUserOrManagedProfile() local
77 sp<IBinder> binder = sm->getService(String16("user")); in isCallerActiveUserOrManagedProfile()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/
DApplicationsSettingsFragment.java47 StorageManager sm = context.getSystemService(StorageManager.class); in onAttach() local
48 VolumeInfo volume = maybeInitializeVolume(sm, getArguments()); in onAttach()

123