/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WaitingStateTest.java | 157 private void initializeStateMachine(StateMachine sm) { in initializeStateMachine() argument 158 sm.setDbg(true); in initializeStateMachine() 159 sm.start(); in initializeStateMachine() 162 private void transitionToState(StateMachine sm, State destState) { in transitionToState() argument 163 sm.transitionTo(destState); in transitionToState() 164 sm.sendMessage(0); // to trigger the transition in transitionToState() 189 ExternalTransitionStateMachine sm = new ExternalTransitionStateMachine( in testExternalTransitionStateMachine() local 191 initializeStateMachine(sm); in testExternalTransitionStateMachine() 195 verifyEnterExit(sm.A, true, false); in testExternalTransitionStateMachine() 196 sm.resetTestFlags(); in testExternalTransitionStateMachine() [all …]
|
/packages/services/Car/cpp/car_binder_lib/largeParcelable/tests/ |
D | MappedFileSharedMemoryTest.cpp | 39 SharedMemory sm(std::move(fd)); in TEST() local 41 ASSERT_FALSE(sm.isValid()); in TEST() 42 ASSERT_NE(OK, sm.getErr()); in TEST() 47 SharedMemory sm(std::move(fd)); in TEST() local 49 ASSERT_FALSE(sm.isValid()); in TEST() 54 SharedMemory sm(std::move(fd)); in TEST() local 56 ASSERT_FALSE(sm.isValid()); in TEST() 59 void testSharedMemoryMapRead(const SharedMemory& sm) { in testSharedMemoryMapRead() argument 60 std::unique_ptr<MappedFile> mappedFile = sm.mapReadOnly(); in testSharedMemoryMapRead() 69 SharedMemory sm(std::move(fd)); in TEST() local [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientService.java | 177 HeadsetClientStateMachine sm = in stop() local 179 sm.doQuit(); in stop() 224 for (HeadsetClientStateMachine sm : mStateMachineMap.values()) { 225 if (sm != null) { 226 sm.sendMessage( 247 for (HeadsetClientStateMachine sm : mStateMachineMap.values()) { 248 if (sm != null) { 249 sm.sendMessage( 624 HeadsetClientStateMachine sm = getStateMachine(device, true); in connect() local 625 if (sm == null) { in connect() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | CallAudioModeStateMachineTest.java | 89 CallAudioModeStateMachine sm = new CallAudioModeStateMachine(mSystemStateHelper, in testNoFocusWhenRingerSilenced() local 91 sm.setCallAudioManager(mCallAudioManager); in testNoFocusWhenRingerSilenced() 92 sm.sendMessage(CallAudioModeStateMachine.ABANDON_FOCUS_FOR_TESTING); in testNoFocusWhenRingerSilenced() 93 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testNoFocusWhenRingerSilenced() 98 sm.sendMessage(CallAudioModeStateMachine.NEW_RINGING_CALL, new Builder() in testNoFocusWhenRingerSilenced() 106 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testNoFocusWhenRingerSilenced() 108 assertEquals(CallAudioModeStateMachine.RING_STATE_NAME, sm.getCurrentStateName()); in testNoFocusWhenRingerSilenced() 121 CallAudioModeStateMachine sm = new CallAudioModeStateMachine(mSystemStateHelper, in testSwitchToStreamingMode() local 123 sm.setCallAudioManager(mCallAudioManager); in testSwitchToStreamingMode() 124 sm.sendMessage(CallAudioModeStateMachine.ABANDON_FOCUS_FOR_TESTING); in testSwitchToStreamingMode() [all …]
|
D | BluetoothRouteManagerTest.java | 101 BluetoothRouteManager sm = setupStateMachine( in testConnectLeftHearingAidWhenLeftIsActive() local 103 sm.onActiveDeviceChanged(HEARING_AID_DEVICE_LEFT, in testConnectLeftHearingAidWhenLeftIsActive() 112 executeRoutingAction(sm, in testConnectLeftHearingAidWhenLeftIsActive() 115 executeRoutingAction(sm, in testConnectLeftHearingAidWhenLeftIsActive() 119 + ":" + HEARING_AID_DEVICE_LEFT.getAddress(), sm.getCurrentState().getName()); in testConnectLeftHearingAidWhenLeftIsActive() 121 sm.quitNow(); in testConnectLeftHearingAidWhenLeftIsActive() 127 BluetoothRouteManager sm = setupStateMachine( in testConnectRightHearingAidWhenLeftIsActive() local 129 sm.onActiveDeviceChanged(HEARING_AID_DEVICE_LEFT, in testConnectRightHearingAidWhenLeftIsActive() 139 executeRoutingAction(sm, in testConnectRightHearingAidWhenLeftIsActive() 142 executeRoutingAction(sm, in testConnectRightHearingAidWhenLeftIsActive() [all …]
|
D | BluetoothRouteTransitionTests.java | 290 BluetoothRouteManager sm = setupStateMachine( in testTransitions() local 302 sm.setActiveDeviceCacheForTesting(mParams.activeDevice, deviceType); in testTransitions() 310 sm.sendMessage(BluetoothRouteManager.BT_AUDIO_LOST, args); in testTransitions() 317 sm.onDeviceAdded(mParams.messageDevice.getAddress()); in testTransitions() 318 sm.onActiveDeviceChanged(mParams.messageDevice, deviceType); in testTransitions() 320 sm.onActiveDeviceChanged(null, deviceType); in testTransitions() 332 sm.onDeviceLost(mParams.messageDevice.getAddress()); in testTransitions() 334 executeRoutingAction(sm, mParams.messageType, in testTransitions() 338 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testTransitions() 339 waitForHandlerAction(sm.getHandler(), TEST_TIMEOUT); in testTransitions() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/mapclient/ |
D | MapClientServiceTest.java | 113 MceStateMachine sm = mock(MceStateMachine.class); in dump_callsStateMachineDump() local 114 mService.getInstanceMap().put(mRemoteDevice, sm); in dump_callsStateMachineDump() 119 verify(sm).dump(builder); in dump_callsStateMachineDump() 170 MceStateMachine sm = mock(MceStateMachine.class); in disconnect_whenConnected_returnsTrue() local 171 when(sm.getState()).thenReturn(connectionState); in disconnect_whenConnected_returnsTrue() 172 mService.getInstanceMap().put(mRemoteDevice, sm); in disconnect_whenConnected_returnsTrue() 176 verify(sm).disconnect(); in disconnect_whenConnected_returnsTrue() 188 MceStateMachine sm = mock(MceStateMachine.class); in getConnectionState_whenConnected() local 189 when(sm.getState()).thenReturn(connectionState); in getConnectionState_whenConnected() 190 mService.getInstanceMap().put(mRemoteDevice, sm); in getConnectionState_whenConnected() [all …]
|
D | MapClientTest.java | 125 MceStateMachine sm = map.get(device); in testConnect() local 126 Assert.assertNotNull(sm); in testConnect() 127 TestUtils.waitForLooperToFinishScheduledTask(sm.getHandler().getLooper()); in testConnect() 129 Assert.assertEquals(BluetoothProfile.STATE_CONNECTING, sm.getState()); in testConnect() 130 mService.cleanupDevice(device, sm); in testConnect()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/bas/ |
D | BatteryService.java | 115 for (BatteryStateMachine sm : mStateMachines.values()) { in stop() 116 sm.doQuit(); in stop() 117 sm.cleanup(); in stop() 189 BatteryStateMachine sm = getOrCreateStateMachine(device); in connect() local 190 if (sm == null) { in connect() 194 sm.sendMessage(BatteryStateMachine.CONNECT); in connect() 225 BatteryStateMachine sm = getOrCreateStateMachine(device); in disconnect() local 226 if (sm != null) { in disconnect() 227 sm.sendMessage(BatteryStateMachine.DISCONNECT); in disconnect() 241 for (BatteryStateMachine sm : mStateMachines.values()) { in getConnectedDevices() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/bass_client/ |
D | BassClientServiceTest.java | 440 for (BassClientStateMachine sm : mStateMachines.values()) { in testStartSearchingForSources() 441 Mockito.clearInvocations(sm); in testStartSearchingForSources() 447 for (BassClientStateMachine sm : mStateMachines.values()) { in testStartSearchingForSources() 448 verify(sm).sendMessage(BassClientStateMachine.START_SCAN_OFFLOAD); in testStartSearchingForSources() 494 for (BassClientStateMachine sm : mStateMachines.values()) { in prepareConnectedDeviceGroup() 496 verify(sm).sendMessage(eq(BassClientStateMachine.CONNECT)); in prepareConnectedDeviceGroup() 499 BluetoothDevice dev = sm.getDevice(); in prepareConnectedDeviceGroup() 501 .when(sm) in prepareConnectedDeviceGroup() 503 sm.mService = mBassClientService; in prepareConnectedDeviceGroup() 504 sm.mDevice = dev; in prepareConnectedDeviceGroup() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapServiceTest.java | 117 PbapStateMachine sm = mock(PbapStateMachine.class); in disconnect() local 118 mService.mPbapStateMachineMap.put(mRemoteDevice, sm); in disconnect() 122 verify(sm).sendMessage(PbapStateMachine.DISCONNECT); in disconnect() 127 PbapStateMachine sm = mock(PbapStateMachine.class); in getConnectedDevices() local 128 mService.mPbapStateMachineMap.put(mRemoteDevice, sm); in getConnectedDevices() 152 PbapStateMachine sm = mock(PbapStateMachine.class); in getDevicesMatchingConnectionStates() local 153 mService.mPbapStateMachineMap.put(mRemoteDevice, sm); in getDevicesMatchingConnectionStates() 154 when(sm.getConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED); in getDevicesMatchingConnectionStates() 163 PbapStateMachine sm = mock(PbapStateMachine.class); in onAcceptFailed() local 164 mService.mPbapStateMachineMap.put(mRemoteDevice, sm); in onAcceptFailed() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/ |
D | A2dpService.java | 224 for (A2dpStateMachine sm : mStateMachines.values()) { in stop() 225 sm.doQuit(); in stop() 226 sm.cleanup(); in stop() 324 A2dpStateMachine sm = mStateMachines.get(device); in disconnect() local 325 if (sm == null) { in disconnect() 329 sm.sendMessage(A2dpStateMachine.DISCONNECT); in disconnect() 337 for (A2dpStateMachine sm : mStateMachines.values()) { in getConnectedDevices() 338 if (sm.isConnected()) { in getConnectedDevices() 339 devices.add(sm.getDevice()); in getConnectedDevices() 357 for (A2dpStateMachine sm : mStateMachines.values()) { in connectionAllowedCheckMaxDevices() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hearingaid/ |
D | HearingAidService.java | 165 for (HearingAidStateMachine sm : mStateMachines.values()) { in stop() 166 sm.doQuit(); in stop() 167 sm.cleanup(); in stop() 281 HearingAidStateMachine sm = getOrCreateStateMachine(storedDevice); in connect() local 282 if (sm == null) { in connect() 286 sm.sendMessage(HearingAidStateMachine.CONNECT); in connect() 319 HearingAidStateMachine sm = mStateMachines.get(storedDevice); in disconnect() local 320 if (sm == null) { in disconnect() 326 sm.sendMessage(HearingAidStateMachine.DISCONNECT); in disconnect() 340 for (HearingAidStateMachine sm : mStateMachines.values()) { in getConnectedDevices() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbapclient/ |
D | PbapClientServiceTest.java | 120 PbapClientStateMachine sm = mock(PbapClientStateMachine.class); in dump_callsStateMachineDump() local 121 mService.mPbapClientStateMachineMap.put(mRemoteDevice, sm); in dump_callsStateMachineDump() 126 verify(sm).dump(builder); in dump_callsStateMachineDump() 200 PbapClientStateMachine sm = mock(PbapClientStateMachine.class); in testDisconnect_whenConnected_returnsTrue() local 201 mService.mPbapClientStateMachineMap.put(mRemoteDevice, sm); in testDisconnect_whenConnected_returnsTrue() 205 verify(sm).disconnect(mRemoteDevice); in testDisconnect_whenConnected_returnsTrue() 216 PbapClientStateMachine sm = mock(PbapClientStateMachine.class); in cleanUpDevice() local 217 mService.mPbapClientStateMachineMap.put(mRemoteDevice, sm); in cleanUpDevice() 227 PbapClientStateMachine sm = mock(PbapClientStateMachine.class); in getConnectedDevices() local 228 mService.mPbapClientStateMachineMap.put(mRemoteDevice, sm); in getConnectedDevices() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/csip/ |
D | CsipSetCoordinatorService.java | 182 for (CsipSetCoordinatorStateMachine sm : mStateMachines.values()) { in stop() 183 sm.doQuit(); in stop() 184 sm.cleanup(); in stop() 295 CsipSetCoordinatorStateMachine sm = getOrCreateStateMachine(device); in disconnect() local 296 if (sm != null) { in disconnect() 297 sm.sendMessage(CsipSetCoordinatorStateMachine.DISCONNECT); in disconnect() 308 for (CsipSetCoordinatorStateMachine sm : mStateMachines.values()) { in getConnectedDevices() 309 if (sm.isConnected()) { in getConnectedDevices() 310 devices.add(sm.getDevice()); in getConnectedDevices() 365 CsipSetCoordinatorStateMachine sm = mStateMachines.get(device); in getDevicesMatchingConnectionStates() local [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/vc/ |
D | VolumeControlService.java | 276 for (VolumeControlStateMachine sm : mStateMachines.values()) { in stop() 277 sm.doQuit(); in stop() 278 sm.cleanup(); in stop() 388 VolumeControlStateMachine sm = getOrCreateStateMachine(device); in disconnect() local 389 if (sm != null) { in disconnect() 390 sm.sendMessage(VolumeControlStateMachine.DISCONNECT); in disconnect() 400 for (VolumeControlStateMachine sm : mStateMachines.values()) { in getConnectedDevices() 401 if (sm.isConnected()) { in getConnectedDevices() 402 devices.add(sm.getDevice()); in getConnectedDevices() 464 VolumeControlStateMachine sm = mStateMachines.get(device); in getDevicesMatchingConnectionStates() local [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hap/ |
D | HapClientService.java | 178 for (HapClientStateMachine sm : mStateMachines.values()) { in stop() 179 sm.doQuit(); in stop() 180 sm.cleanup(); in stop() 233 HapClientStateMachine sm = mStateMachines.get(device); in bondStateChanged() local 234 if (sm == null) { in bondStateChanged() 237 if (sm.getConnectionState() != BluetoothProfile.STATE_DISCONNECTED) { in bondStateChanged() 248 HapClientStateMachine sm = mStateMachines.get(device); in removeStateMachine() local 249 if (sm == null) { in removeStateMachine() 256 sm.doQuit(); in removeStateMachine() 257 sm.cleanup(); in removeStateMachine() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapService.java | 225 PbapStateMachine sm = mPbapStateMachineMap.get(device); in parseIntent() local 226 if (sm == null) { in parseIntent() 236 mSessionStatusHandler.removeMessages(USER_TIMEOUT, sm); in parseIntent() 249 sm.sendMessage(PbapStateMachine.AUTHORIZED); in parseIntent() 255 sm.sendMessage(PbapStateMachine.REJECTED); in parseIntent() 262 PbapStateMachine sm = mPbapStateMachineMap.get(device); in parseIntent() local 263 if (sm == null) { in parseIntent() 266 Message msg = sm.obtainMessage(PbapStateMachine.AUTH_KEY_INPUT, sessionKey); in parseIntent() 267 sm.sendMessage(msg); in parseIntent() 272 PbapStateMachine sm = mPbapStateMachineMap.get(device); in parseIntent() local [all …]
|
/packages/services/Telephony/src/com/android/services/telephony/domainselection/ |
D | TelephonyDomainSelectionService.java | 233 SubscriptionManager sm = mContext.getSystemService(SubscriptionManager.class); in onCreate() local 234 if (sm != null) { in onCreate() 235 sm.addOnSubscriptionsChangedListener(getExecutor(), mSubscriptionsChangedListener); in onCreate() 277 SubscriptionManager sm = mContext.getSystemService(SubscriptionManager.class); in onDestroy() local 278 if (sm != null) { in onDestroy() 279 sm.removeOnSubscriptionsChangedListener(mSubscriptionsChangedListener); in onDestroy() 407 SubscriptionManager sm = mContext.getSystemService(SubscriptionManager.class); in handleSubscriptionsChanged() local 409 sm = sm.createForAllUserProfiles(); in handleSubscriptionsChanged() 412 (sm != null) ? sm.getActiveSubscriptionInfoList() : null; in handleSubscriptionsChanged()
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | SystemStateHelper.java | 190 SensorManager sm = context.getSystemService(SensorManager.class); in isDeviceAtEar() local 191 if (sm == null) { in isDeviceAtEar() 194 Sensor grav = sm.getDefaultSensor(Sensor.TYPE_GRAVITY); in isDeviceAtEar() 195 Sensor proximity = sm.getDefaultSensor(Sensor.TYPE_PROXIMITY); in isDeviceAtEar() 240 sm.registerListener(listener, grav, SensorManager.SENSOR_DELAY_FASTEST); in isDeviceAtEar() 241 sm.registerListener(listener, proximity, SensorManager.SENSOR_DELAY_FASTEST); in isDeviceAtEar() 254 sm.unregisterListener(listener); in isDeviceAtEar()
|
/packages/modules/Bluetooth/system/bta/le_audio/broadcaster/ |
D | broadcaster_test.cc | 803 auto sm = MockBroadcastStateMachine::GetLastInstance(); in TEST_F() local 806 EXPECT_CALL(*sm, UpdateBroadcastAnnouncement) in TEST_F() 827 ON_CALL(*sm, GetBroadcastAnnouncement()) in TEST_F() 877 auto sm = MockBroadcastStateMachine::GetLastInstance(); in TEST_F() local 891 ON_CALL(*sm, IsPublicBroadcast()).WillByDefault(Return(true)); in TEST_F() 892 ON_CALL(*sm, GetBroadcastName()).WillByDefault(Return(test_broadcast_name)); in TEST_F() 893 ON_CALL(*sm, GetBroadcastCode()).WillByDefault(Return(test_broadcast_code)); in TEST_F() 894 ON_CALL(*sm, GetAdvertisingSid()).WillByDefault(Return(test_adv_sid)); in TEST_F() 895 ON_CALL(*sm, GetBroadcastAnnouncement()) in TEST_F() 897 ON_CALL(*sm, GetPublicBroadcastAnnouncement()) in TEST_F() [all …]
|
/packages/modules/DnsResolver/ |
D | DnsQueryLogTest.cpp | 49 std::smatch sm; in verifyDumpOutput() local 52 EXPECT_TRUE(std::regex_search(str, sm, pattern)); in verifyDumpOutput() 53 EXPECT_EQ(sm[1], std::to_string(netId)); in verifyDumpOutput() 54 str = sm.suffix(); in verifyDumpOutput() 58 EXPECT_FALSE(std::regex_search(str, sm, pattern)); in verifyDumpOutput()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
D | SaveState.java | 96 StateMachine sm = ViewModelProviders in onSuccess() local 98 sm.getListener().onComplete(this, StateMachine.RESULT_SUCCESS); in onSuccess() 106 StateMachine sm = ViewModelProviders in onFailure() local 108 sm.getListener().onComplete(this, StateMachine.RESULT_FAILURE); in onFailure()
|
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app/src/com/android/cts/netpolicy/hostside/ |
D | DataWarningReceiverTest.java | 65 final SubscriptionManager sm = mContext.getSystemService(SubscriptionManager.class); in testSnoozeWarningNotReceived() local 71 final List<SubscriptionPlan> originalPlans = sm.getSubscriptionPlans(subId); in testSnoozeWarningNotReceived() 83 sm.setSubscriptionPlans(subId, Arrays.asList(plan)); in testSnoozeWarningNotReceived() 99 sm.setSubscriptionPlans(subId, originalPlans); in testSnoozeWarningNotReceived()
|
/packages/modules/Bluetooth/system/common/ |
D | state_machine_unittest.cc | 46 StateZero(StateMachine& sm) in StateZero() argument 47 : State(sm, kStateZero), in StateZero() 75 StateOne(StateMachine& sm) in StateOne() argument 76 : State(sm, kStateOne), in StateOne() 104 StateTwo(StateMachine& sm) in StateTwo() argument 105 : State(sm, kStateTwo), in StateTwo()
|