Home
last modified time | relevance | path

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

123456789

/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/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodHelperActivity.java223 String action = intent.getAction(); in onCreate() local
224 Log.d(TAG, "ByodHelperActivity.onCreate: " + action); in onCreate()
230 if (action.equals(ACTION_PROFILE_PROVISIONED)) { in onCreate()
236 } else if (action.equals(ACTION_QUERY_PROFILE_OWNER)) { in onCreate()
241 } else if (action.equals(ACTION_REMOVE_MANAGED_PROFILE)) { in onCreate()
248 } else if (action.equals(ACTION_CHECK_DISK_ENCRYPTION)) { in onCreate()
253 } else if (action.equals(ACTION_INSTALL_APK)) { in onCreate()
259 } else if (action.equals(ACTION_INSTALL_APK_WORK_PROFILE_GLOBAL_RESTRICTION)) { in onCreate()
269 } else if (action.equals(ACTION_INSTALL_APK_PRIMARY_PROFILE_GLOBAL_RESTRICTION)) { in onCreate()
279 } else if (action.equals(ACTION_CHECK_INTENT_FILTERS)) { in onCreate()
[all …]
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/
DMyBroadcastReceiver.java77 final String action = intent.getAction(); in onReceive() local
78 switch (action) { in onReceive()
80 increaseCounter(context, action); in onReceive()
91 Log.e(TAG, "received unexpected action: " + action); in onReceive()
100 private void increaseCounter(Context context, String action) { in increaseCounter() argument
103 final int value = prefs.getInt(action, 0) + 1; in increaseCounter()
104 Log.d(TAG, "increaseCounter('" + action + "'): setting '" + mName + "' to " + value); in increaseCounter()
105 prefs.edit().putInt(action, value).apply(); in increaseCounter()
108 static int getCounter(Context context, String action, String receiverName) { in getCounter() argument
111 final int value = prefs.getInt(action, 0); in getCounter()
[all …]
/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/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 …]
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DDirectActionsTest.java64 final DirectAction action = getExpectedDirectActionAssertively(actions); in testPerformDirectAction() local
67 final Bundle result = mSessionControl.performDirectAction(action, in testPerformDirectAction()
89 final DirectAction action = getExpectedDirectActionAssertively(actions); in testCancelPerformedDirectAction() local
92 final Bundle result = mSessionControl.performDirectActionAndCancel(action, in testCancelPerformedDirectAction()
200 @Nullable Bundle executeCommand(@NonNull String action, @Nullable DirectAction directAction, in executeCommand() argument
213 command.putString(Utils.DIRECT_ACTIONS_KEY_COMMAND, action); in executeCommand()
218 Log.v(TAG, "executeCommand(): action=" + action + " command=" in executeCommand()
223 Log.v(TAG, "Executing post-action command for " + action); in executeCommand()
288 @NonNull Bundle executeRemoteCommand(@NonNull String action) throws Exception { in executeRemoteCommand() argument
289 return executeRemoteCommand(action, /* postActionCommand= */ null); in executeRemoteCommand()
[all …]
/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/tests/framework/base/windowmanager/src/android/server/wm/
DDragDropTest.java105 public int action; // DragEvent.getAction() field in DragDropTest.LogEntry
113 LogEntry(View v, int action, float x, float y, ClipData clipData, in LogEntry() argument
116 this.action = action; in LogEntry()
134 return view == other.view && action == other.action in equals()
145 sb.append("DragEvent {action=").append(action).append(" x=").append(x).append(" y=") in toString()
157 private static ClipData obtainClipData(int action) { in obtainClipData() argument
158 if (action == DragEvent.ACTION_DROP) { in obtainClipData()
164 private static ClipDescription obtainClipDescription(int action) { in obtainClipDescription() argument
165 if (action == DragEvent.ACTION_DRAG_ENDED) { in obtainClipDescription()
183 private void expectEvent5(int action, int viewId) { in expectEvent5() argument
[all …]
/cts/tests/autofillservice/src/android/autofillservice/cts/
DDisableAutofillTest.java75 private long launchSimpleSaveActivity(PostLaunchAction action) throws Exception { in launchSimpleSaveActivity() argument
76 Log.v(TAG, "launchPreSimpleSaveActivity(): " + action); in launchSimpleSaveActivity()
79 if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchSimpleSaveActivity()
98 if (action == PostLaunchAction.ASSERT_DISABLING) { in launchSimpleSaveActivity()
105 } else if (action == PostLaunchAction.ASSERT_DISABLED) { in launchSimpleSaveActivity()
109 } else if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchSimpleSaveActivity()
119 assertAutofillEnabled(activity, action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL); in launchSimpleSaveActivity()
129 private long launchPreSimpleSaveActivity(PostLaunchAction action) throws Exception { in launchPreSimpleSaveActivity() argument
130 Log.v(TAG, "launchPreSimpleSaveActivity(): " + action); in launchPreSimpleSaveActivity()
133 if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchPreSimpleSaveActivity()
[all …]
/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/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/permission2/src/android/permission2/cts/
DProtectedBroadcastsTest.java97 for (String action : BROADCASTS) { in testSendProtectedBroadcasts()
99 Intent intent = new Intent(action); in testSendProtectedBroadcasts()
101 fail("expected security exception broadcasting action: " + action); in testSendProtectedBroadcasts()
112 for (String action : BROADCASTS_TELEPHONY) { in testSendProtectedTelephonyBroadcasts()
114 Intent intent = new Intent(action); in testSendProtectedTelephonyBroadcasts()
116 fail("expected security exception broadcasting telephony action: " + action); in testSendProtectedTelephonyBroadcasts()
/cts/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/src/com/android/cts/permissiondeclareapp/
DUtilsProvider.java54 final String action = intent.getAction(); in call() local
58 if (ACTION_GRANT_URI.equals(action)) { in call()
63 } else if (ACTION_REVOKE_URI.equals(action)) { in call()
67 } else if (ACTION_START_ACTIVITY.equals(action)) { in call()
72 } else if (ACTION_START_SERVICE.equals(action)) { in call()
76 } else if (ACTION_VERIFY_OUTGOING_PERSISTED.equals(action)) { in call()
79 } else if (ACTION_SET_PRIMARY_CLIP.equals(action)) { in call()
83 } else if (ACTION_CLEAR_PRIMARY_CLIP.equals(action)) { in call()
86 } else if (ACTION_SET_INSTALLER_PACKAGE_NAME.equals(action)) { in call()
/cts/libs/input/src/com/android/cts/input/
DHidJsonParser.java200 int action = keyActionFromString(entry.getString("action")); in parseKeyEvent() local
202 return new KeyEvent(action, keyCode); in parseKeyEvent()
222 int action = motionActionFromString(entry.getString("action")); in parseMotionEvent() local
224 MotionEvent event = MotionEvent.obtain(/* downTime */ 0, /* eventTime */ 0, action, in parseMotionEvent()
230 private int keyActionFromString(String action) { in keyActionFromString() argument
231 switch (action.toUpperCase()) { in keyActionFromString()
237 throw new RuntimeException("Unknown action specified: " + action); in keyActionFromString()
240 private int motionActionFromString(String action) { in motionActionFromString() argument
241 switch (action.toUpperCase()) { in motionActionFromString()
249 throw new RuntimeException("Unknown action specified: " + action); in motionActionFromString()
/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()
/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/app/src/android/app/cts/
DRemoteActionTest.java42 PendingIntent action = PendingIntent.getBroadcast( in testParcel() local
44 RemoteAction reference = new RemoteAction(icon, title, description, action); in testParcel()
56 assertEquals(action.getCreatorPackage(), result.getActionIntent().getCreatorPackage()); in testParcel()
66 PendingIntent action = PendingIntent.getBroadcast( in testClone() local
68 RemoteAction reference = new RemoteAction(icon, title, description, action); in testClone()
77 assertEquals(action.getCreatorPackage(), result.getActionIntent().getCreatorPackage()); in testClone()
/cts/tests/tests/assist/src/android/assist/cts/
DLifecycleTest.java129 protected void onAction(Bundle bundle, String action) { in onAction() argument
130 if (action.equals(ACTION_HAS_FOCUS) && mHasFocusLatch != null) { in onAction()
132 } else if (action.equals(ACTION_LOST_FOCUS) && mLostFocusLatch != null) { in onAction()
138 } else if (action.equals(ACTION_ON_PAUSE) && mActivityLifecycleLatch != null) { in onAction()
140 } else if (action.equals(ACTION_ON_STOP) && mActivityLifecycleLatch != null) { in onAction()
142 } else if (action.equals(ACTION_ON_DESTROY) && mActivityLifecycleLatch != null) { in onAction()
146 super.onAction(bundle, action); in onAction()
/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/hostsidetests/backup/SharedPreferencesRestoreApp/src/android/cts/backup/sharedprefrestoreapp/
DSharedPrefsRestoreTestActivity.java66 final String action = intent.getAction(); in processLaunchCommand() local
67 Log.i(TAG, "processLaunchCommand: " + action); in processLaunchCommand()
71 if (INIT_ACTION.equals(action)) { in processLaunchCommand()
74 } else if (UPDATE_ACTION.equals(action)) { in processLaunchCommand()
79 } else if (TEST_ACTION.equals(action)) { in processLaunchCommand()
/cts/tests/tests/view/src/android/view/cts/
DContentPaneFocusTest.java68 ActionBar action = mActivity.getActionBar(); in testAccessActionBar() local
69 if (action == null || !action.isShowing()) { in testAccessActionBar()
119 ActionBar action = mActivity.getActionBar(); in testNoFocusablesInContent() local
120 if (action == null || !action.isShowing()) { in testNoFocusablesInContent()
162 private void sendMetaKey(int action) throws Throwable { in sendMetaKey() argument
164 KeyEvent keyEvent = new KeyEvent(time, time, action, KeyEvent.KEYCODE_META_LEFT, 0, in sendMetaKey()
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/
DAbstractContentCaptureActivity.java109 public final void syncRunOnUiThread(@NonNull Runnable action) { in syncRunOnUiThread() argument
110 syncRunOnUiThread(action, Helper.GENERIC_TIMEOUT_MS); in syncRunOnUiThread()
116 public final <T> T syncCallOnUiThread(@NonNull Callable<T> action) throws Exception { in syncCallOnUiThread() argument
121 result.set(action.call()); in syncCallOnUiThread()
137 public final void syncRunOnUiThread(@NonNull Runnable action, long timeoutMs) { in syncRunOnUiThread() argument
140 action.run(); in syncRunOnUiThread()

123456789