Home
last modified time | relevance | path

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

1234567

/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/accessibilityservice/src/android/accessibilityservice/cts/utils/
DCtsTestUtils.java23 public static Throwable assertThrows(Runnable action) { in assertThrows() argument
24 return assertThrows(Throwable.class, action); in assertThrows()
27 public static <E extends Throwable> E assertThrows(Class<E> exceptionClass, Runnable action) { in assertThrows() argument
29 action.run(); in assertThrows()
/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/tests/tests/permission2/src/android/permission2/cts/
DProtectedBroadcastsTest.java96 for (String action : BROADCASTS) { in testSendProtectedBroadcasts()
98 Intent intent = new Intent(action); in testSendProtectedBroadcasts()
100 fail("expected security exception broadcasting action: " + action); in testSendProtectedBroadcasts()
111 for (String action : BROADCASTS_TELEPHONY) { in testSendProtectedTelephonyBroadcasts()
113 Intent intent = new Intent(action); in testSendProtectedTelephonyBroadcasts()
115 fail("expected security exception broadcasting telephony action: " + action); in testSendProtectedTelephonyBroadcasts()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodHelperActivity.java211 String action = intent.getAction(); in onCreate() local
212 Log.d(TAG, "ByodHelperActivity.onCreate: " + action); in onCreate()
218 if (action.equals(ACTION_PROFILE_PROVISIONED)) { in onCreate()
224 } else if (action.equals(ACTION_QUERY_PROFILE_OWNER)) { in onCreate()
229 } else if (action.equals(ACTION_REMOVE_MANAGED_PROFILE)) { in onCreate()
236 } else if (action.equals(ACTION_CHECK_DISK_ENCRYPTION)) { in onCreate()
241 } else if (action.equals(ACTION_INSTALL_APK)) { in onCreate()
262 } else if (action.equals(ACTION_CHECK_INTENT_FILTERS)) { in onCreate()
267 } else if (action.equals(ACTION_CAPTURE_AND_CHECK_IMAGE)) { in onCreate()
283 } else if (action.equals(ACTION_CAPTURE_AND_CHECK_VIDEO_WITH_EXTRA_OUTPUT) || in onCreate()
[all …]
DCompHelperActivity.java82 final String action = getIntent().getAction(); in onCreate() local
83 if (ACTION_SET_ALWAYS_ON_VPN.equals(action)) { in onCreate()
89 } else if (ACTION_INSTALL_CA_CERT.equals(action)) { in onCreate()
91 } else if (ACTION_SET_MAXIMUM_PASSWORD_ATTEMPTS.equals(action)) { in onCreate()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DDisableAutofillTest.java84 private void launchSimpleSaveActivity(PostLaunchAction action) throws Exception { in launchSimpleSaveActivity() argument
85 Log.v(TAG, "launchPreSimpleSaveActivity(): " + action); in launchSimpleSaveActivity()
88 if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchSimpleSaveActivity()
106 if (action == PostLaunchAction.ASSERT_DISABLING) { in launchSimpleSaveActivity()
113 } else if (action == PostLaunchAction.ASSERT_DISABLED) { in launchSimpleSaveActivity()
117 } else if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchSimpleSaveActivity()
127 assertAutofillEnabled(activity, action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL); in launchSimpleSaveActivity()
133 private void launchPreSimpleSaveActivity(PostLaunchAction action) throws Exception { in launchPreSimpleSaveActivity() argument
134 Log.v(TAG, "launchPreSimpleSaveActivity(): " + action); in launchPreSimpleSaveActivity()
137 if (action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL) { in launchPreSimpleSaveActivity()
[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/batterysaving/src/android/os/cts/batterysaving/
DBatterySaverBgServiceTest.java72 final String action = tryStartTestServiceAndReturnAction(targetPackage, false); in testBgServiceThrottled() local
74 assertEquals(action, waitForLastIntentAction(targetPackage)); in testBgServiceThrottled()
108 final String action = tryStartTestServiceAndReturnAction(targetPackage, true); in testBgServiceThrottled() local
110 assertEquals(action, waitForLastIntentAction(targetPackage)); in testBgServiceThrottled()
141 String action = requestLastIntent(targetPackage); in waitForLastIntentAction()
142 if (action != null) { in waitForLastIntentAction()
143 result.set(action); in waitForLastIntentAction()
153 final String action = "start_service_" + getRandomInt() + "_fg=" + foreground; in tryStartTestServiceAndReturnAction() local
160 .setAction(action).build() in tryStartTestServiceAndReturnAction()
164 return action; in tryStartTestServiceAndReturnAction()
/cts/tests/tests/background/src/android/app/cts/backgroundrestrictions/
DBroadcastsTest.java130 for (String action : list) { in testNonSupportedBroadcastsNotDelivered()
131 filter.addAction(action); in testNonSupportedBroadcastsNotDelivered()
149 for (String action : list) { in testNonSupportedBroadcastsNotDelivered()
150 final Intent intent = new Intent(action) in testNonSupportedBroadcastsNotDelivered()
173 for (String action : SUPPORTED_BROADCASTS) { in testNonSupportedBroadcastsNotDelivered()
174 assertTrue(receivedBroadcasts.contains(action)); in testNonSupportedBroadcastsNotDelivered()
175 assertTrue(history.contains(action)); in testNonSupportedBroadcastsNotDelivered()
178 for (String action : UNSUPPORTED_BROADCASTS) { in testNonSupportedBroadcastsNotDelivered()
179 assertFalse(receivedBroadcasts.contains(action)); in testNonSupportedBroadcastsNotDelivered()
180 assertFalse(history.contains(action)); in testNonSupportedBroadcastsNotDelivered()
/cts/tests/tests/os/src/android/os/cts/
DLaunchpadActivity.java180 final String action = getIntent().getAction(); in onCreate() local
181 if (LIFECYCLE_BASIC.equals(action)) { in onCreate()
185 } else if (LIFECYCLE_SCREEN.equals(action)) { in onCreate()
194 } else if (LIFECYCLE_DIALOG.equals(action)) { in onCreate()
277 final String action = getIntent().getAction(); in onResume() local
281 if (LAUNCH.equals(action)) { in onResume()
287 } else if (FORWARD_RESULT.equals(action)) { in onResume()
292 } else if (BAD_PARCELABLE.equals(action)) { in onResume()
298 } else if (BROADCAST_REGISTERED.equals(action)) { in onResume()
305 } else if (BROADCAST_LOCAL.equals(action)) { in onResume()
[all …]
/cts/tests/app/app/src/android/app/stubs/
DLaunchpadActivity.java180 final String action = getIntent().getAction(); in onCreate() local
181 if (LIFECYCLE_BASIC.equals(action)) { in onCreate()
185 } else if (LIFECYCLE_SCREEN.equals(action)) { in onCreate()
194 } else if (LIFECYCLE_DIALOG.equals(action)) { in onCreate()
277 final String action = getIntent().getAction(); in onResume() local
281 if (LAUNCH.equals(action)) { in onResume()
287 } else if (FORWARD_RESULT.equals(action)) { in onResume()
292 } else if (BAD_PARCELABLE.equals(action)) { in onResume()
298 } else if (BROADCAST_REGISTERED.equals(action)) { in onResume()
305 } else if (BROADCAST_LOCAL.equals(action)) { in onResume()
[all …]
/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()
DTaskCaseCommon.h31 inline TaskCase* getTaskCase(TaskGeneric*& setup, TaskGeneric*& action) in getTaskCase() argument
37 action = factory.createTask(TaskGeneric::ETaskAction); in getTaskCase()
38 taskCase->addChild(action); in getTaskCase()
DTaskSequentialTest.cpp26 TaskGeneric* action = NULL; in SetUp() local
27 mTestCase = getTaskCase(setup, action); in SetUp()
30 ASSERT_TRUE(action != NULL); in SetUp()
32 action->addChild(mSequential); in SetUp()
/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/tests/tests/view/src/android/view/cts/
DDragDropTest.java101 public int action; // DragEvent.getAction() field in DragDropTest.LogEntry
109 LogEntry(View v, int action, float x, float y, ClipData clipData, in LogEntry() argument
112 this.action = action; in LogEntry()
130 return view == other.view && action == other.action in equals()
141 sb.append("DragEvent {action=").append(action).append(" x=").append(x).append(" y=") in toString()
153 private static ClipData obtainClipData(int action) { in obtainClipData() argument
154 if (action == DragEvent.ACTION_DROP) { in obtainClipData()
160 private static ClipDescription obtainClipDescription(int action) { in obtainClipDescription() argument
161 if (action == DragEvent.ACTION_DRAG_ENDED) { in obtainClipDescription()
179 private void expectEvent5(int action, int viewId) { in expectEvent5() argument
[all …]
DContentPaneFocusTest.java67 ActionBar action = mActivity.getActionBar(); in testAccessActionBar() local
68 if (action == null || !action.isShowing()) { in testAccessActionBar()
118 ActionBar action = mActivity.getActionBar(); in testNoFocusablesInContent() local
119 if (action == null || !action.isShowing()) { in testNoFocusablesInContent()
161 private void sendMetaKey(int action) throws Throwable { in sendMetaKey() argument
163 KeyEvent keyEvent = new KeyEvent(time, time, action, KeyEvent.KEYCODE_META_LEFT, 0, in sendMetaKey()
/cts/tests/tests/app/src/android/app/cts/
DRemoteActionTest.java41 PendingIntent action = PendingIntent.getBroadcast( in testParcel() local
43 RemoteAction reference = new RemoteAction(icon, title, description, action); in testParcel()
55 assertEquals(action.getCreatorPackage(), result.getActionIntent().getCreatorPackage()); in testParcel()
65 PendingIntent action = PendingIntent.getBroadcast( in testClone() local
67 RemoteAction reference = new RemoteAction(icon, title, description, action); in testClone()
76 assertEquals(action.getCreatorPackage(), result.getActionIntent().getCreatorPackage()); in testClone()
/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/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/hostsidetests/statsd/apps/statsdapp/src/com/android/server/cts/device/statsd/
DStatsdCtsBackgroundService.java41 String action = intent.getStringExtra(KEY_ACTION); in onHandleIntent() local
42 Log.i(TAG, "Starting " + action + " from background service."); in onHandleIntent()
44 switch (action) { in onHandleIntent()
DVideoPlayerActivity.java47 String action = intent.getStringExtra(KEY_ACTION); in onCreate() local
48 Log.i(TAG, "Starting " + action + " from foreground activity."); in onCreate()
50 switch (action) { in onCreate()
59 Log.e(TAG, "Intent had invalid action " + action); in onCreate()
/cts/tests/tests/assist/src/android/assist/cts/
DLifecycleTest.java168 String action = intent.getAction(); in onReceive() local
169 if (action.equals(action_hasResumed) && mHasResumedLatch != null) { in onReceive()
171 } else if (action.equals(action_hasFocus) && mHasFocusLatch != null) { in onReceive()
173 } else if (action.equals(action_lostFocus) && mLostFocusLatch != null) { in onReceive()
179 } else if (action.equals(action_onPause) && mActivityLifecycleLatch != null) { in onReceive()
181 } else if (action.equals(action_onStop) && mActivityLifecycleLatch != null) { in onReceive()
183 } else if (action.equals(action_onDestroy) && mActivityLifecycleLatch != null) { in onReceive()
186 } else if (action.equals(Utils.ASSIST_RECEIVER_REGISTERED)) { in onReceive()

1234567