Home
last modified time | relevance | path

Searched refs:intent (Results 1 – 25 of 403) sorted by relevance

12345678910>>...17

/cts/tests/tests/content/src/android/content/cts/
DAvailableIntentsTest.java44 private void assertCanBeHandled(final Intent intent) { in assertCanBeHandled() argument
46 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertCanBeHandled()
58 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewNormalUrl() local
59 assertCanBeHandled(intent); in testViewNormalUrl()
68 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewSecureUrl() local
69 assertCanBeHandled(intent); in testViewSecureUrl()
78 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchNormalUrl() local
79 intent.putExtra(SearchManager.QUERY, uri); in testWebSearchNormalUrl()
80 assertCanBeHandled(intent); in testWebSearchNormalUrl()
89 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchSecureUrl() local
[all …]
DReadableUriExtraToClipDataTest.java54 public void onReceive(Context context, Intent intent) { in setUp()
83 Intent intent = new Intent(Intent.ACTION_SEND); in testUriExtraStreamMigratedToClipData_sendIntent() local
84 intent.setComponent(new ComponentName(getContext(), ReadableFileReceiverActivity.class)); in testUriExtraStreamMigratedToClipData_sendIntent()
85 intent.putExtra(Intent.EXTRA_STREAM, mTestFileUris.get(0)); in testUriExtraStreamMigratedToClipData_sendIntent()
86 intent.setType("*/*"); in testUriExtraStreamMigratedToClipData_sendIntent()
87 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testUriExtraStreamMigratedToClipData_sendIntent()
89 getContext().startActivity(intent); in testUriExtraStreamMigratedToClipData_sendIntent()
95 Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE); in testUriExtraStreamMigratedToClipData_sendMultipleIntent() local
96 intent.setComponent(new ComponentName(getContext(), ReadableFileReceiverActivity.class)); in testUriExtraStreamMigratedToClipData_sendMultipleIntent()
97 intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, mTestFileUris); in testUriExtraStreamMigratedToClipData_sendMultipleIntent()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/
DMediaStoreIntentsTest.java32 public void assertCanBeHandled(Intent intent) { in assertCanBeHandled() argument
34 .getPackageManager().queryIntentActivities(intent, 0); in assertCanBeHandled()
36 assertTrue("No ResolveInfo found for " + intent.toInsecureString(), in assertCanBeHandled()
41 Intent intent = new Intent(Intent.ACTION_PICK); in testPickImageDir() local
42 intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI); in testPickImageDir()
43 assertCanBeHandled(intent); in testPickImageDir()
47 Intent intent = new Intent(Intent.ACTION_PICK); in testPickVideoDir() local
48 intent.setData(MediaStore.Video.Media.EXTERNAL_CONTENT_URI); in testPickVideoDir()
49 assertCanBeHandled(intent); in testPickVideoDir()
53 Intent intent = new Intent(Intent.ACTION_PICK); in testPickAudioDir() local
[all …]
DContactsContractIntentsTest.java31 public void assertCanBeHandled(Intent intent) { in assertCanBeHandled() argument
33 .getPackageManager().queryIntentActivities(intent, 0); in assertCanBeHandled()
35 assertTrue("No ResolveInfo found for " + intent.toInsecureString(), in assertCanBeHandled()
40 Intent intent = new Intent(Intent.ACTION_VIEW); in testViewContactDir() local
41 intent.setData(ContactsContract.Contacts.CONTENT_URI); in testViewContactDir()
42 assertCanBeHandled(intent); in testViewContactDir()
46 Intent intent = new Intent(Intent.ACTION_PICK); in testPickContactDir() local
47 intent.setData(ContactsContract.Contacts.CONTENT_URI); in testPickContactDir()
48 assertCanBeHandled(intent); in testPickContactDir()
52 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); in testGetContentContactDir() local
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDelegatedCertInstallerTest.java139 public void onReceive(Context context, Intent intent) {
140 if (ACTION_CERT_OPERATION_DONE.equals(intent.getAction())) {
142 mReceivedResult = intent.getBooleanExtra(EXTRA_RESULT_VALUE, false);
144 (Exception) intent.getSerializableExtra(EXTRA_RESULT_EXCEPTION);
260 Intent intent = new Intent(); in installCaCert() local
261 intent.setAction(ACTION_INSTALL_CERT); in installCaCert()
262 intent.setComponent(CERT_INSTALLER_COMPONENT); in installCaCert()
263 intent.putExtra(EXTRA_CERT_DATA, cert); in installCaCert()
264 intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); in installCaCert()
265 mContext.sendBroadcast(intent); in installCaCert()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DNfcTest.java31 Intent intent = getTextShareIntent(); in testNfcShareDisabled() local
32 assertFalse("Nfc beam activity should not be resolved", isNfcBeamActivityResolved(intent)); in testNfcShareDisabled()
36 Intent intent = getTextShareIntent(); in testNfcShareEnabled() local
37 assertTrue("Nfc beam activity should be resolved", isNfcBeamActivityResolved(intent)); in testNfcShareEnabled()
41 Intent intent = new Intent(); in getTextShareIntent() local
42 intent.setAction(Intent.ACTION_SEND); in getTextShareIntent()
43 intent.putExtra(Intent.EXTRA_TEXT, SAMPLE_TEXT); in getTextShareIntent()
44 intent.setType(TEXT_MIME_TYPE); in getTextShareIntent()
45 return intent; in getTextShareIntent()
48 private boolean isNfcBeamActivityResolved(Intent intent) { in isNfcBeamActivityResolved() argument
[all …]
/cts/tests/app/app/src/android/app/stubs/
DLocalActivityManagerTestHelper.java90 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testRemoveAllActivity() local
91 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testRemoveAllActivity()
92 mLocalActivityManager.startActivity(id, intent); in testRemoveAllActivity()
118 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testDispatchDestroy() local
119 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testDispatchDestroy()
120 mLocalActivityManager.startActivity(id1, intent); in testDispatchDestroy()
134 mLocalActivityManager.startActivity(id2, intent); in testDispatchDestroy()
160 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testSaveInstanceState() local
161 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testSaveInstanceState()
162 mLocalActivityManager.startActivity(id, intent); in testSaveInstanceState()
[all …]
DLaunchpadActivity.java282 final Intent intent = getIntent(); in onResume() local
283 intent.setFlags(0); in onResume()
284 intent.setComponent((ComponentName) intent.getParcelableExtra("component")); in onResume()
285 startActivityForResult(intent, LAUNCHED_RESULT); in onResume()
288 final Intent intent = getIntent(); in onResume() local
289 intent.setFlags(0); in onResume()
290 intent.setClass(this, LocalScreen.class); in onResume()
291 startActivityForResult(intent, FORWARDED_RESULT); in onResume()
294 final Intent intent = getIntent(); in onResume() local
295 intent.setFlags(0); in onResume()
[all …]
/cts/apps/NotificationBot/src/com/android/cts/robot/
DNotificationBot.java59 public void onReceive(Context context, Intent intent) { in onReceive() argument
60 Log.i(TAG, "received intent: " + intent); in onReceive()
61 if (ACTION_POST.equals(intent.getAction())) { in onReceive()
63 if (!intent.hasExtra(EXTRA_NOTIFICATION) || !intent.hasExtra(EXTRA_ID)) { in onReceive()
67 int id = intent.getIntExtra(EXTRA_ID, -1); in onReceive()
69 Notification n = (Notification) intent.getParcelableExtra(EXTRA_NOTIFICATION); in onReceive()
75 } else if (ACTION_CANCEL.equals(intent.getAction())) { in onReceive()
77 int id = intent.getIntExtra(EXTRA_ID, -1); in onReceive()
87 } else if (ACTION_RESET_SETUP_NOTIFICATION.equals(intent.getAction())) { in onReceive()
88 testShortcutResetSetupNotification(context, intent); in onReceive()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DLaunchpadActivity.java282 final Intent intent = getIntent(); in onResume() local
283 intent.setFlags(0); in onResume()
284 intent.setComponent((ComponentName) intent.getParcelableExtra("component")); in onResume()
285 startActivityForResult(intent, LAUNCHED_RESULT); in onResume()
288 final Intent intent = getIntent(); in onResume() local
289 intent.setFlags(0); in onResume()
290 intent.setClass(this, LocalScreen.class); in onResume()
291 startActivityForResult(intent, FORWARDED_RESULT); in onResume()
294 final Intent intent = getIntent(); in onResume() local
295 intent.setFlags(0); in onResume()
[all …]
/cts/tests/tests/permission/src/android/permission/cts/
DTelephonyManagerPermissionTest.java179 Intent intent = new Intent("android.intent.action.SIM_STATE_CHANGED"); in testProtectedBroadcasts() local
180 getContext().sendBroadcast(intent); in testProtectedBroadcasts()
184 Intent intent = new Intent("android.intent.action.SERVICE_STATE"); in testProtectedBroadcasts() local
185 getContext().sendBroadcast(intent); in testProtectedBroadcasts()
189 Intent intent = new Intent("android.intent.action.ACTION_DEFAULT_SUBSCRIPTION_CHANGED"); in testProtectedBroadcasts() local
190 getContext().sendBroadcast(intent); in testProtectedBroadcasts()
194 Intent intent = new Intent( in testProtectedBroadcasts() local
196 getContext().sendBroadcast(intent); in testProtectedBroadcasts()
200 Intent intent = new Intent( in testProtectedBroadcasts() local
202 getContext().sendBroadcast(intent); in testProtectedBroadcasts()
[all …]
/cts/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/src/com/android/cts/permissiondeclareapp/
DGrantUriPermission.java44 public void onReceive(Context context, Intent intent) { in onReceive() argument
46 final String action = intent.getAction(); in onReceive()
48 final Uri uri = intent.getParcelableExtra(EXTRA_URI); in onReceive()
49 context.grantUriPermission(intent.getStringExtra(EXTRA_PACKAGE_NAME), uri, in onReceive()
50 intent.getIntExtra(EXTRA_MODE, 0)); in onReceive()
53 final Uri uri = intent.getParcelableExtra(EXTRA_URI); in onReceive()
54 context.revokeUriPermission(uri, intent.getIntExtra(EXTRA_MODE, 0)); in onReceive()
57 final Intent newIntent = intent.getParcelableExtra(EXTRA_INTENT); in onReceive()
62 final Intent newIntent = intent.getParcelableExtra(EXTRA_INTENT); in onReceive()
66 verifyOutgoingPersisted(context, intent); in onReceive()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DLockTaskUtilityActivity.java36 protected void onNewIntent(Intent intent) { in onNewIntent() argument
37 super.onNewIntent(intent); in onNewIntent()
38 handleIntent(intent); in onNewIntent()
66 private void handleIntent(Intent intent) { in handleIntent() argument
67 if (intent.getBooleanExtra(START_LOCK_TASK, false)) { in handleIntent()
70 if (intent.getBooleanExtra(STOP_LOCK_TASK, false)) { in handleIntent()
73 if (intent.hasExtra(START_ACTIVITY)) { in handleIntent()
74 Intent i = intent.getParcelableExtra(START_ACTIVITY); in handleIntent()
77 if (intent.getBooleanExtra(FINISH, false)) { in handleIntent()
/cts/tests/tests/voicesettings/service/src/android/voicesettings/service/
DMainInteractionSession.java80 Intent intent; in onShow() local
83 intent = new Intent(ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE); in onShow()
84 intent.putExtra(EXTRA_DO_NOT_DISTURB_MODE_ENABLED, true); in onShow()
85 intent.putExtra(EXTRA_DO_NOT_DISTURB_MODE_MINUTES, in onShow()
89 intent = new Intent(ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE); in onShow()
90 intent.putExtra(EXTRA_DO_NOT_DISTURB_MODE_ENABLED, false); in onShow()
93 intent = new Intent(ACTION_VOICE_CONTROL_AIRPLANE_MODE); in onShow()
94 intent.putExtra(EXTRA_AIRPLANE_MODE_ENABLED, true); in onShow()
97 intent = new Intent(ACTION_VOICE_CONTROL_AIRPLANE_MODE); in onShow()
98 intent.putExtra(EXTRA_AIRPLANE_MODE_ENABLED, false); in onShow()
[all …]
/cts/tests/admin/src/android/admin/cts/
DDeviceAdminReceiverTest.java142 public void onPasswordChanged(Context context, Intent intent) { in onPasswordChanged() argument
143 super.onPasswordChanged(context, intent); in onPasswordChanged()
148 public void onPasswordFailed(Context context, Intent intent) { in onPasswordFailed() argument
149 super.onPasswordFailed(context, intent); in onPasswordFailed()
154 public void onPasswordSucceeded(Context context, Intent intent) { in onPasswordSucceeded() argument
155 super.onPasswordSucceeded(context, intent); in onPasswordSucceeded()
160 public void onEnabled(Context context, Intent intent) { in onEnabled() argument
161 super.onEnabled(context, intent); in onEnabled()
166 public CharSequence onDisableRequested(Context context, Intent intent) { in onDisableRequested() argument
172 public void onDisabled(Context context, Intent intent) { in onDisabled() argument
[all …]
/cts/tests/tests/externalservice/src/android/externalservice/cts/
DExternalServiceTest.java55 Intent intent = new Intent(); in testFailBindIsolated() local
56 intent.setComponent(new ComponentName(sServicePackage, sServicePackage+".IsolatedService")); in testFailBindIsolated()
58 getContext().bindService(intent, mConnection, Context.BIND_AUTO_CREATE); in testFailBindIsolated()
66 Intent intent = new Intent(); in testFailBindExternalIsolated() local
67 intent.setComponent(new ComponentName(sServicePackage, sServicePackage+".IsolatedService")); in testFailBindExternalIsolated()
69 getContext().bindService(intent, mConnection, in testFailBindExternalIsolated()
79 Intent intent = new Intent(); in testFailBindExternalExported() local
80 intent.setComponent(new ComponentName(sServicePackage, sServicePackage+".ExportedService")); in testFailBindExternalExported()
82 getContext().bindService(intent, mConnection, in testFailBindExternalExported()
91 Intent intent = new Intent(); in testFailBindExternalNonExported() local
[all …]
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/
DContentTest.java17 package com.android.cts.intent.sender;
72 Intent intent = new Intent(ACTION_READ_FROM_URI); in testReceiverCanRead() local
73 intent.setClipData(ClipData.newRawUri("", uri)); in testReceiverCanRead()
74 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); in testReceiverCanRead()
76 final Intent result = mActivity.getCrossProfileResult(intent); in testReceiverCanRead()
92 Intent intent = new Intent(ACTION_WRITE_TO_URI); in testReceiverCanWrite() local
93 intent.setClipData(ClipData.newRawUri("", uri)); in testReceiverCanWrite()
94 intent.putExtra("extra_message", MESSAGE); in testReceiverCanWrite()
95 intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION in testReceiverCanWrite()
98 mActivity.getCrossProfileResult(intent); in testReceiverCanWrite()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DPolicyTransparencyTestListActivity.java81 final Intent intent =
86 POLICIES[i] = Pair.create(intent, policyLabels[i]);
124 final Intent intent = UserRestrictions.getUserRestrictionTestIntent(this, restriction); in addTestsToAdapter() local
131 intent.putExtra(PolicyTransparencyTestActivity.EXTRA_TEST_ID, testId); in addTestsToAdapter()
132 adapter.add(TestListItem.newTest(title, testId, intent, null)); in addTestsToAdapter()
136 final Intent intent = policy.first; in addTestsToAdapter() local
137 String test = intent.getStringExtra(PolicyTransparencyTestActivity.EXTRA_TEST); in addTestsToAdapter()
144 intent.putExtra(PolicyTransparencyTestActivity.EXTRA_TITLE, title); in addTestsToAdapter()
145 intent.putExtra(PolicyTransparencyTestActivity.EXTRA_TEST_ID, testId); in addTestsToAdapter()
146 adapter.add(TestListItem.newTest(title, testId, intent, null)); in addTestsToAdapter()
[all …]
/cts/tests/tests/alarmclock/src/android/alarmclock/cts/
DAlarmClockTestBase.java80 Intent intent; in isIntentSupported() local
83 intent = new Intent(AlarmClock.ACTION_DISMISS_ALARM); in isIntentSupported()
88 intent = new Intent(AlarmClock.ACTION_SET_ALARM); in isIntentSupported()
92 intent = new Intent(AlarmClock.ACTION_SNOOZE_ALARM); in isIntentSupported()
101 if (manager.resolveActivity(intent, 0) == null) { in isIntentSupported()
102 Log.i(TAG, "No Voice Activity found for the intent: " + intent.getAction()); in isIntentSupported()
129 Intent intent = new Intent(); in startTestActivity() local
130 intent.setAction("android.intent.action.TEST_START_ACTIVITY_" + testCaseType.toString()); in startTestActivity()
131 intent.setComponent(new ComponentName(getInstrumentation().getContext(), in startTestActivity()
133 setActivityIntent(intent); in startTestActivity()
[all …]
/cts/tests/tests/tv/src/android/tv/settings/cts/
DSettingsLeanbackTest.java64 Intent intent = new Intent(Intent.ACTION_MAIN); in testLeanbackLauncherIntentCategory() local
65 intent.addCategory(Intent.CATEGORY_LEANBACK_LAUNCHER); in testLeanbackLauncherIntentCategory()
66 assertIntentCanBeHandled(intent); in testLeanbackLauncherIntentCategory()
79 Intent intent = new Intent(Intent.ACTION_MAIN); in testLeanbackSettingsIntentCategory() local
80 intent.addCategory(LEANBACK_SETTINGS_CATEGORY); in testLeanbackSettingsIntentCategory()
81 assertIntentCanBeHandled(intent); in testLeanbackSettingsIntentCategory()
84 private void assertIntentCanBeHandled(final Intent intent) { in assertIntentCanBeHandled() argument
87 packageManager.queryIntentActivities(intent, 0); in assertIntentCanBeHandled()
/cts/tests/tests/assist/service/src/android/voiceinteraction/service/
DDelayedAssistantActivity.java32 Intent intent = new Intent(); in onCreate() local
33 intent.setComponent(new ComponentName(this, MainInteractionService.class)); in onCreate()
34 intent.putExtra(Utils.EXTRA_REGISTER_RECEIVER, true); in onCreate()
35 intent.putExtra(Utils.TESTCASE_TYPE, getIntent().getStringExtra(Utils.TESTCASE_TYPE)); in onCreate()
36 intent.putExtra(Utils.DISPLAY_WIDTH_KEY, in onCreate()
38 intent.putExtra(Utils.DISPLAY_HEIGHT_KEY, in onCreate()
41 ComponentName serviceName = startService(intent); in onCreate()
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DCertInstallerReceiver.java68 public void onReceive(Context context, Intent intent) { in onReceive() argument
69 if (intent == null) { in onReceive()
73 String action = intent.getAction(); in onReceive()
81 certBuffer = intent.getByteArrayExtra(EXTRA_CERT_DATA); in onReceive()
99 certBuffer = intent.getByteArrayExtra(EXTRA_CERT_DATA); in onReceive()
111 certBuffer = intent.getByteArrayExtra(EXTRA_CERT_DATA); in onReceive()
119 String alias = intent.getStringExtra(EXTRA_KEY_ALIAS); in onReceive()
120 String key = intent.getStringExtra(EXTRA_KEY_DATA); in onReceive()
121 String cert = intent.getStringExtra(EXTRA_CERT_DATA); in onReceive()
149 Intent intent = new Intent(); in sendResult() local
[all …]
/cts/tests/tests/assist/src/android/assist/cts/
DTestStartActivity.java92 Intent intent = new Intent(); in startTest() local
93 intent.putExtra(Utils.TESTCASE_TYPE, testCaseName); in startTest()
94 intent.setAction("android.intent.action.START_TEST_" + testCaseName); in startTest()
95 intent.setComponent(new ComponentName("android.assist.service", in startTest()
97 startActivity(intent); in startTest()
101 Intent intent = new Intent(); in start3pApp() local
102 intent.putExtra(Utils.TESTCASE_TYPE, testCaseName); in start3pApp()
103 intent.setAction("android.intent.action.TEST_APP_" + testCaseName); in start3pApp()
104 intent.setComponent(Utils.getTestAppComponent(testCaseName)); in start3pApp()
105 startActivity(intent); in start3pApp()
[all …]
/cts/hostsidetests/devicepolicy/app/WifiConfigCreator/src/com/android/cts/deviceowner/wificonfigcreator/
DWifiConfigCreatorActivity.java46 Intent intent = getIntent(); in onCreate() local
47 String action = intent.getAction(); in onCreate()
49 String ssid = intent.getStringExtra(EXTRA_SSID); in onCreate()
50 int securityType = intent.getIntExtra(EXTRA_SECURITY_TYPE, SECURITY_TYPE_NONE); in onCreate()
51 String password = intent.getStringExtra(EXTRA_PASSWORD); in onCreate()
54 int netId = intent.getIntExtra(EXTRA_NETID, -1); in onCreate()
55 String ssid = intent.getStringExtra(EXTRA_SSID); in onCreate()
56 int securityType = intent.getIntExtra(EXTRA_SECURITY_TYPE, SECURITY_TYPE_NONE); in onCreate()
57 String password = intent.getStringExtra(EXTRA_PASSWORD); in onCreate()
60 int netId = intent.getIntExtra(EXTRA_NETID, -1); in onCreate()
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DActivityTransitionTest.java91 Intent intent = new Intent(mActivity, ActivityTransitionActivity.class); in testOnSharedElementsArrived()
92 intent.putExtra(ActivityTransitionActivity.TEST, in testOnSharedElementsArrived()
94 intent.putExtra(ActivityTransitionActivity.LAYOUT_ID, R.layout.end); in testOnSharedElementsArrived()
95 intent.putExtra(ActivityTransitionActivity.RESULT_RECEIVER, mReceiver); in testOnSharedElementsArrived()
96 mActivity.startActivityForResult(intent, 0, options); in testOnSharedElementsArrived()
139 Intent intent = new Intent(mActivity, ActivityTransitionActivity.class);
140 intent.putExtra(ActivityTransitionActivity.LAYOUT_ID, R.layout.end);
141 intent.putExtra(ActivityTransitionActivity.QUICK_FINISH, true);
142 intent.putExtra(ActivityTransitionActivity.RESULT_RECEIVER, mReceiver);
143 mActivity.startActivityForResult(intent, 0, options);
[all …]

12345678910>>...17