Home
last modified time | relevance | path

Searched refs:action (Results 1 – 25 of 309) sorted by relevance

12345678910>>...13

/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/
DCtsTestUtils.java26 public static Throwable assertThrows(Runnable action) { in assertThrows() argument
27 return assertThrows(Throwable.class, action); in assertThrows()
30 public static <E extends Throwable> E assertThrows(Class<E> exceptionClass, Runnable action) { in assertThrows() argument
32 action.run(); in assertThrows()
42 public static <T> void runIfNotNull(T callee, Consumer<T> action) { in runIfNotNull() argument
43 Optional.ofNullable(callee).ifPresent(action); in runIfNotNull()
/cts/tests/smartspace/src/android/smartspace/cts/
DSmartspaceActionTest.java61 SmartspaceAction action = new SmartspaceAction.Builder("id", "title") in testCreateSmartspaceAction() local
72 assertThat(action.getIcon()).isEqualTo(icon); in testCreateSmartspaceAction()
73 assertThat(action.getContentDescription()).isEqualTo("description"); in testCreateSmartspaceAction()
74 assertThat(action.getExtras()).isEqualTo(extras); in testCreateSmartspaceAction()
75 assertThat(action.getPendingIntent()).isEqualTo(dummyPendingIntent); in testCreateSmartspaceAction()
76 assertThat(action.getIntent()).isEqualTo(intent); in testCreateSmartspaceAction()
77 assertThat(action.getUserHandle()).isEqualTo(Process.myUserHandle()); in testCreateSmartspaceAction()
78 assertThat(action.getSubtitle()).isEqualTo("subtitle"); in testCreateSmartspaceAction()
82 action.writeToParcel(parcel, 0); in testCreateSmartspaceAction()
85 assertThat(action.getSubtitle()).isEqualTo(copy.getSubtitle()); in testCreateSmartspaceAction()
/cts/hostsidetests/wifibroadcasts/app/src/android/wifibroadcasts/app/
DWifiBroadcastsDeviceActivity.java41 String action = intent.getAction();
42 Toast.makeText(mContext, action, Toast.LENGTH_SHORT).show();
43 if (WifiManager.RSSI_CHANGED_ACTION.equals(action)) {
44 Log.i(TAG, "UNEXPECTED WIFI BROADCAST RECEIVED - " + action);
53 String action = WifiManager.RSSI_CHANGED_ACTION; in onCreate() local
54 filter.addAction(action); in onCreate()
56 Log.i(TAG, "Registered " + action); in onCreate()
/cts/tests/tests/assist/common/src/android/assist/common/
DBaseRemoteCallbackActivity.java35 protected void notify(String action) { in notify() argument
39 throw new IllegalStateException("Test ran expecting " + action in notify()
43 bundle.putString(Utils.EXTRA_REMOTE_CALLBACK_ACTION, action); in notify()
56 String action = results.getString(Utils.EXTRA_REMOTE_CALLBACK_ACTION); in registerReceivingCallback()
57 if (action.equals(Utils.ACTION_END_OF_TEST)) { in registerReceivingCallback()
62 onReceivedEventFromCaller(results, action); in registerReceivingCallback()
75 protected void onReceivedEventFromCaller(Bundle results, String action) { in onReceivedEventFromCaller() argument
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/
DBatteryStatsForegroundActivity.java44 String action = intent.getStringExtra(KEY_ACTION); in onCreate() local
46 Log.i(TAG, "Starting " + action + " from foreground activity as request " + requestCode); in onCreate()
49 BatteryStatsBgVsFgActions.checkAppState(this, false, action, requestCode); in onCreate()
51 doAction(this, action, requestCode); in onCreate()
53 if (!isActionAsync(action)) { in onCreate()
58 private boolean isActionAsync(String action) { in isActionAsync() argument
59 switch (action) { in isActionAsync()
DBatteryStatsBackgroundService.java37 String action = intent.getStringExtra(KEY_ACTION); in onHandleIntent() local
39 Log.i(TAG, "Starting " + action + " from background service as request " + requestCode); in onHandleIntent()
42 BatteryStatsBgVsFgActions.checkAppState(this, true, action, requestCode); in onHandleIntent()
44 doAction(this, action, requestCode); in onHandleIntent()
/cts/hostsidetests/car/src/android/car/cts/powerpolicy/
DPowerPolicyTestResult.java36 public void addCriteria(String testcase, String action, String subject, String data) in addCriteria() argument
38 if (testcase == null || action == null) { in addCriteria()
44 mExpected.add(testcase, action, subject, data); in addCriteria()
75 public void checkLastTestResultEntry(String testcase, String action, in checkLastTestResultEntry() argument
79 .that(lastEntry.equalsWithPowerPolicyData(testcase, action, subject, policy)) in checkLastTestResultEntry()
83 public void checkLastTestResultEntry(String testcase, String action, in checkLastTestResultEntry() argument
86 expected.add(testcase, action, subject, data); in checkLastTestResultEntry()
93 public boolean checkLastTestResultEntryData(String testcase, String action, in checkLastTestResultEntryData() argument
96 expected.add(testcase, action, subject, data); in checkLastTestResultEntryData()
/cts/hostsidetests/devicepolicy/app/SimpleApp/src/com/android/cts/launcherapps/simpleapp/
DSimpleActivityStartFgService.java42 final String action = getIntent().getAction(); in onCreate() local
43 Log.i(TAG, "onCreate() with intent " + action); in onCreate()
44 if (ACTION_START_THEN_FG.equals(action)) { in onCreate()
50 } else if (ACTION_FINISH_EVERYTHING.equals(action)) { in onCreate()
65 final String action = intent.getAction(); in onNewIntent() local
66 if (ACTION_FINISH_EVERYTHING.equals(action)) { in onNewIntent()
/cts/tests/tests/permission2/src/android/permission2/cts/
DProtectedBroadcastsTest.java94 for (String action : BROADCASTS) { in testSendProtectedBroadcasts()
96 Intent intent = new Intent(action); in testSendProtectedBroadcasts()
98 fail("expected security exception broadcasting action: " + action); in testSendProtectedBroadcasts()
109 for (String action : BROADCASTS_TELEPHONY) { in testSendProtectedTelephonyBroadcasts()
111 Intent intent = new Intent(action); in testSendProtectedTelephonyBroadcasts()
113 fail("expected security exception broadcasting telephony action: " + action); in testSendProtectedTelephonyBroadcasts()
/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/
DBatterySaverBgServiceTest.java73 final String action = tryStartTestServiceAndReturnAction(targetPackage, false); in testBgServiceThrottled() local
75 assertEquals(action, waitForLastIntentAction(targetPackage)); in testBgServiceThrottled()
109 final String action = tryStartTestServiceAndReturnAction(targetPackage, true); in testBgServiceThrottled() local
111 assertEquals(action, waitForLastIntentAction(targetPackage)); in testBgServiceThrottled()
142 String action = requestLastIntent(targetPackage); in waitForLastIntentAction()
143 if (action != null) { in waitForLastIntentAction()
144 result.set(action); in waitForLastIntentAction()
154 final String action = "start_service_" + getRandomInt() + "_fg=" + foreground; in tryStartTestServiceAndReturnAction() local
161 .setAction(action).build() in tryStartTestServiceAndReturnAction()
165 return action; in tryStartTestServiceAndReturnAction()
/cts/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/src/com/android/cts/permissiondeclareapp/
DUtilsProvider.java56 final String action = intent.getAction(); in call() local
60 if (ACTION_GRANT_URI.equals(action)) { in call()
65 } else if (ACTION_REVOKE_URI.equals(action)) { in call()
69 } else if (ACTION_START_ACTIVITY.equals(action)) { in call()
74 } else if (ACTION_START_ACTIVITIES.equals(action)) { in call()
79 } else if (ACTION_START_SERVICE.equals(action)) { in call()
83 } else if (ACTION_VERIFY_OUTGOING_PERSISTED.equals(action)) { in call()
86 } else if (ACTION_SET_PRIMARY_CLIP.equals(action)) { in call()
90 } else if (ACTION_CLEAR_PRIMARY_CLIP.equals(action)) { in call()
93 } else if (ACTION_SET_INSTALLER_PACKAGE_NAME.equals(action)) { in call()
/cts/common/device-side/bedstead/dpmwrapper/src/main/java/com/android/bedstead/dpmwrapper/
DTestAppCallbacksReceiver.java84 String action = realIntent.getAction(); in onReceive() local
87 receivers = sRealReceivers.get(action); in onReceive()
90 Log.e(TAG, "onReceive(): no receiver for " + action + ": " + sRealReceivers); in onReceive()
109 filter.actionsIterator().forEachRemaining((action) -> { in registerReceiver()
110 Log.d(TAG, "Registering " + receiver + " for " + action); in registerReceiver()
111 ArrayList<BroadcastReceiver> receivers = sRealReceivers.get(action); in registerReceiver()
114 if (VERBOSE) Log.v(TAG, "Creating list of receivers for " + action); in registerReceiver()
115 sRealReceivers.put(action, receivers); in registerReceiver()
127 String action = sRealReceivers.keyAt(i); in unregisterReceiver() local
131 Log.d(TAG, "Removed " + receiver + " for action " + action); in unregisterReceiver()
/cts/tests/tests/background/src/android/app/cts/backgroundrestrictions/
DBroadcastsTest.java131 for (String action : list) { in testNonSupportedBroadcastsNotDelivered()
132 filter.addAction(action); in testNonSupportedBroadcastsNotDelivered()
150 for (String action : list) { in testNonSupportedBroadcastsNotDelivered()
151 final Intent intent = new Intent(action) in testNonSupportedBroadcastsNotDelivered()
174 for (String action : SUPPORTED_BROADCASTS) { in testNonSupportedBroadcastsNotDelivered()
175 assertTrue(receivedBroadcasts.contains(action)); in testNonSupportedBroadcastsNotDelivered()
176 assertTrue(history.contains(action)); in testNonSupportedBroadcastsNotDelivered()
179 for (String action : UNSUPPORTED_BROADCASTS) { in testNonSupportedBroadcastsNotDelivered()
180 assertFalse(receivedBroadcasts.contains(action)); in testNonSupportedBroadcastsNotDelivered()
181 assertFalse(history.contains(action)); in testNonSupportedBroadcastsNotDelivered()
/cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/
DTextViewActions.java19 import static androidx.test.espresso.action.ViewActions.actionWithAssertions;
28 import androidx.test.espresso.action.CoordinatesProvider;
29 import androidx.test.espresso.action.GeneralClickAction;
30 import androidx.test.espresso.action.PrecisionDescriber;
31 import androidx.test.espresso.action.Press;
32 import androidx.test.espresso.action.Tap;
33 import androidx.test.espresso.action.Tapper;
/cts/tests/tests/os/src/android/os/cts/
DLaunchpadActivity.java178 final String action = getIntent().getAction(); in onCreate() local
179 if (LIFECYCLE_BASIC.equals(action)) { in onCreate()
183 } else if (LIFECYCLE_SCREEN.equals(action)) { in onCreate()
192 } else if (LIFECYCLE_DIALOG.equals(action)) { in onCreate()
275 final String action = getIntent().getAction(); in onResume() local
279 if (LAUNCH.equals(action)) { in onResume()
285 } else if (FORWARD_RESULT.equals(action)) { in onResume()
290 } else if (BAD_PARCELABLE.equals(action)) { in onResume()
296 } else if (BROADCAST_REGISTERED.equals(action)) { in onResume()
303 } else if (BROADCAST_LOCAL.equals(action)) { in onResume()
[all …]
DIntentLaunchActivity.java103 private static Intent getTestIntentWithExtrasInParceledIntent(Context context, String action) { in getTestIntentWithExtrasInParceledIntent() argument
104 Intent intent = getTestIntent(context, action); in getTestIntentWithExtrasInParceledIntent()
135 private static Intent getTestIntentWithUriIntentInExtras(Context context, String action) { in getTestIntentWithUriIntentInExtras() argument
136 Intent intent = getTestIntent(context, action); in getTestIntentWithUriIntentInExtras()
150 private static Intent getTestIntent(Context context, String action) { in getTestIntent() argument
152 intent.setAction(action); in getTestIntent()
164 String action = deliveredIntent.getAction(); in onCreate() local
165 switch (action) { in onCreate()
207 if (ACTION_SAFE_INTENT_FROM_URI_LAUNCH.equals(action)) { in onCreate()
/cts/tests/app/app/src/android/app/stubs/
DLaunchpadActivity.java184 final String action = getIntent().getAction(); in onCreate() local
185 if (LIFECYCLE_BASIC.equals(action)) { in onCreate()
189 } else if (LIFECYCLE_SCREEN.equals(action)) { in onCreate()
198 } else if (LIFECYCLE_DIALOG.equals(action)) { in onCreate()
281 final String action = getIntent().getAction(); in onResume() local
285 if (LAUNCH.equals(action)) { in onResume()
290 } else if (ACTIVITY_PREPARE.equals(action)) { in onResume()
292 } else if (FORWARD_RESULT.equals(action)) { in onResume()
297 } else if (BAD_PARCELABLE.equals(action)) { in onResume()
303 } else if (BROADCAST_REGISTERED.equals(action)) { in onResume()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodHelperActivity.java228 String action = intent.getAction(); in onCreate() local
229 Log.d(TAG, "ByodHelperActivity.onCreate: " + action); in onCreate()
235 if (action.equals(ACTION_QUERY_PROFILE_OWNER)) { in onCreate()
240 } else if (action.equals(ACTION_REMOVE_MANAGED_PROFILE)) { in onCreate()
247 } else if (action.equals(ACTION_CHECK_DISK_ENCRYPTION)) { in onCreate()
252 } else if (action.equals(ACTION_INSTALL_APK)) { in onCreate()
258 } else if (action.equals(ACTION_INSTALL_APK_WORK_PROFILE_GLOBAL_RESTRICTION)) { in onCreate()
268 } else if (action.equals(ACTION_INSTALL_APK_PRIMARY_PROFILE_GLOBAL_RESTRICTION)) { in onCreate()
278 } else if (action.equals(ACTION_CHECK_INTENT_FILTERS)) { in onCreate()
284 } else if (action.equals(ACTION_CAPTURE_AND_CHECK_IMAGE)) { in onCreate()
[all …]
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DWaitForBroadcast.java49 public void prepare(String action) { in prepare() argument
53 mWaitingAction = action; in prepare()
55 filter.addAction(action); in prepare()
66 String action = mWaitingAction; in doWait() local
68 throw new IllegalStateException("Timed out waiting for broadcast " + action); in doWait()
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DDirectActionsTest.java66 final DirectAction action = getExpectedDirectActionAssertively(actions); in testPerformDirectAction() local
69 final Bundle result = mSessionControl.performDirectAction(action, in testPerformDirectAction()
91 final DirectAction action = getExpectedDirectActionAssertively(actions); in testCancelPerformedDirectAction() local
94 final Bundle result = mSessionControl.performDirectActionAndCancel(action, in testCancelPerformedDirectAction()
243 @NonNull Bundle executeRemoteCommand(@NonNull String action) throws Exception { in executeRemoteCommand() argument
244 return executeRemoteCommand(action, /* postActionCommand= */ null); in executeRemoteCommand()
247 @NonNull Bundle executeRemoteCommand(@NonNull String action, in executeRemoteCommand() argument
254 Log.v(TAG, "executeRemoteCommand(): received result from '" + action + "': " in executeRemoteCommand()
263 command.putString(Utils.VOICE_INTERACTION_KEY_COMMAND, action); in executeRemoteCommand()
266 Log.v(TAG, "executeRemoteCommand(): sending command for '" + action + "'"); in executeRemoteCommand()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DUserActionCallback.java59 String action = intent.getAction();
63 Log.d(TAG, "broadcast receiver received " + action + " with user " + userHandle);
69 boolean removed = mPendingActions.remove(action);
71 Log.e(TAG, "Unexpected action " + action + "; what's left is " + mPendingActions);
88 for (String action : actions) { in UserActionCallback()
89 mExpectedActions.add(action); in UserActionCallback()
90 mPendingActions.add(action); in UserActionCallback()
109 for (String action : actions) { in getCallbackForBroadcastActions()
110 filter.addAction(action); in getCallbackForBroadcastActions()
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DNestedShellPermission.java47 public static void run(Runnable action) { in run() argument
48 run(action, null /* permissions */); in run()
52 public static void run(Runnable action, @Nullable String... permissions) { in run() argument
62 action.run(); in run()
/cts/suite/audio_quality/test/
DTaskProcessTest.cpp29 TaskGeneric* action = NULL; in SetUp() local
30 mTestCase = getTaskCase(setup, action); in SetUp()
33 ASSERT_TRUE(action != NULL); in SetUp()
41 ASSERT_TRUE(action->addChild(mSequential)); in SetUp()
/cts/tests/autofillservice/src/android/autofillservice/cts/servicebehavior/
DDisableAutofillTest.java85 private long launchSimpleSaveActivity(PostLaunchAction action) throws Exception { in launchSimpleSaveActivity() argument
86 Log.v(TAG, "launchPreSimpleSaveActivity(): " + action); in launchSimpleSaveActivity()
89 if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchSimpleSaveActivity()
108 if (action == PostLaunchAction.ASSERT_DISABLING) { in launchSimpleSaveActivity()
115 } else if (action == PostLaunchAction.ASSERT_DISABLED) { in launchSimpleSaveActivity()
119 } else if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchSimpleSaveActivity()
129 assertAutofillEnabled(activity, action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL); in launchSimpleSaveActivity()
139 private long launchPreSimpleSaveActivity(PostLaunchAction action) throws Exception { in launchPreSimpleSaveActivity() argument
140 Log.v(TAG, "launchPreSimpleSaveActivity(): " + action); in launchPreSimpleSaveActivity()
143 if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchPreSimpleSaveActivity()
[all …]
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DIntentReceiverActivity.java80 final String action = received.getAction(); in onCreate() local
83 if (ACTION_COPY_TO_CLIPBOARD.equals(action)) { in onCreate()
91 } else if (ACTION_READ_FROM_URI.equals(action)) { in onCreate()
105 } else if (ACTION_TAKE_PERSISTABLE_URI_PERMISSION.equals(action)) { in onCreate()
110 } else if (ACTION_WRITE_TO_URI.equals(action)) { in onCreate()
123 } else if (ACTION_NOTIFY_URI_CHANGE.equals(action)) { in onCreate()
127 } else if (ACTION_OBSERVE_URI_CHANGE.equals(action)) { in onCreate()
140 } else if (ACTION_JUST_CREATE.equals(action) || ACTION_CREATE_AND_WAIT.equals(action)) { in onCreate()
144 if (!ACTION_CREATE_AND_WAIT.equals(action)) { in onCreate()

12345678910>>...13