Home
last modified time | relevance | path

Searched refs:Intent (Results 1 – 25 of 1539) sorted by relevance

12345678910>>...62

/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DIntentFiltersTestHelper.java24 import android.content.Intent;
58 private static final ArrayList<Intent> forwardedIntentsFromPrimary =
60 new Intent(Intent.ACTION_SEND).setType("*/*"),
61 new Intent(Intent.ACTION_SEND_MULTIPLE).setType("*/*")
65 private static final ArrayList<Intent> forwardedIntentsFromManaged =
67 new Intent(AlarmClock.ACTION_SET_ALARM),
68 new Intent(AlarmClock.ACTION_SET_TIMER),
69 new Intent(AlarmClock.ACTION_SHOW_ALARMS),
70 new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS),
71 new Intent(Settings.ACTION_CAPTIONING_SETTINGS),
[all …]
DByodFlowTestActivity.java25 import android.content.Intent;
147 public void onReceive(Context context, Intent intent) { in onReceive()
177 startActivity(new Intent(this, TestListActivity.class)); in onCreate()
208 protected void onNewIntent(Intent intent) { in onNewIntent()
220 protected void handleActivityResult(int requestCode, int resultCode, Intent data) { in handleActivityResult()
245 private void handleStatusUpdate(int resultCode, Intent data) { in handleStatusUpdate()
290 new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME), in setupTests()
297 new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)); in setupTests()
303 new Intent(ByodHelperActivity.ACTION_TEST_PATTERN_WORK_CHALLENGE)); in setupTests()
309 new Intent(Settings.ACTION_SETTINGS)); in setupTests()
[all …]
/cts/tests/tests/permission2/src/android/permission2/cts/
DProtectedBroadcastsTest.java19 import android.content.Intent;
28 Intent.ACTION_SCREEN_OFF,
29 Intent.ACTION_SCREEN_ON,
30 Intent.ACTION_USER_PRESENT,
31 Intent.ACTION_TIME_TICK,
32 Intent.ACTION_TIMEZONE_CHANGED,
33 Intent.ACTION_BOOT_COMPLETED,
34 Intent.ACTION_PACKAGE_INSTALL,
35 Intent.ACTION_PACKAGE_ADDED,
36 Intent.ACTION_PACKAGE_REPLACED,
[all …]
/cts/tests/tests/content/src/android/content/cts/
DAvailableIntentsTest.java26 import android.content.Intent;
61 private void assertCanBeHandled(final Intent intent) { in assertCanBeHandled()
73 private void assertDefaultHandlerValidPriority(final Intent intent) { in assertDefaultHandlerValidPriority()
86 private void assertHandledBySystemOnly(final Intent intent) { in assertHandledBySystemOnly()
100 private void assertHandledBySelfOnly(final Intent intent) { in assertHandledBySelfOnly()
118 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewNormalUrl()
128 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewSecureUrl()
138 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchNormalUrl()
149 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchSecureUrl()
160 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchPlainText()
[all …]
DIntentTest.java25 import android.content.Intent;
53 private Intent mIntent;
74 mIntent = new Intent(); in setUp()
82 mIntent = new Intent(); in testConstructor()
85 Intent intent = new Intent(); in testConstructor()
88 mIntent = new Intent(intent); in testConstructor()
92 mIntent = new Intent(TEST_ACTION); in testConstructor()
96 mIntent = new Intent(TEST_ACTION, TEST_URI); in testConstructor()
101 mIntent = new Intent(mContext, MockActivity.class); in testConstructor()
105 mIntent = new Intent(TEST_ACTION, TEST_URI, mContext, MockActivity.class); in testConstructor()
[all …]
DIntent_FilterComparisonTest.java19 import android.content.Intent;
20 import android.content.Intent.FilterComparison;
26 Intent mIntent;
32 mIntent = new Intent(); in setUp()
38 mFilterComparison = new Intent.FilterComparison(mIntent); in testConstructor()
44 mFilterComparison = new Intent.FilterComparison(mIntent); in testHashCode()
50 mFilterComparison = new Intent.FilterComparison(mIntent); in testEquals()
52 FilterComparison target = new Intent.FilterComparison(mIntent); in testEquals()
55 target = new Intent.FilterComparison(new Intent("test")); in testEquals()
60 mFilterComparison = new Intent.FilterComparison(mIntent); in testGetIntent()
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/cts/shareduidtests/
DEnqueueJobWorkTest.java23 import android.content.Intent;
60 private boolean intentEquals(Intent i1, Intent i2) { in intentEquals()
109 Intent work1 = new Intent("work1"); in testEnqueueOneWork()
127 Intent work1 = new Intent("work1"); in testEnqueueMultipleWork()
128 Intent work2 = new Intent("work2"); in testEnqueueMultipleWork()
129 Intent work3 = new Intent("work3"); in testEnqueueMultipleWork()
130 Intent work4 = new Intent("work4"); in testEnqueueMultipleWork()
131 Intent work5 = new Intent("work5"); in testEnqueueMultipleWork()
132 Intent work6 = new Intent("work6"); in testEnqueueMultipleWork()
133 Intent work7 = new Intent("work7"); in testEnqueueMultipleWork()
[all …]
DClipDataJobTest.java23 import android.content.Intent;
68 Process.myUid(), Intent.FLAG_GRANT_READ_URI_PERMISSION)); in testClipDataGrant()
71 Process.myUid(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION)); in testClipDataGrant()
76 .setClipData(mFirstClipData, Intent.FLAG_GRANT_READ_URI_PERMISSION in testClipDataGrant()
77 | Intent.FLAG_GRANT_WRITE_URI_PERMISSION).build()); in testClipDataGrant()
83 Process.myUid(), Intent.FLAG_GRANT_READ_URI_PERMISSION)); in testClipDataGrant()
86 Process.myUid(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION)); in testClipDataGrant()
98 waitPermissionRevoke(mFirstUri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, 5000); in testClipDataGrant()
108 .setClipData(mFirstClipData, Intent.FLAG_GRANT_READ_URI_PERMISSION in testClipDataGrant_Failed()
109 | Intent.FLAG_GRANT_WRITE_URI_PERMISSION).build()); in testClipDataGrant_Failed()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DIntentLaunchActivity.java21 import android.content.Intent;
59 public static Intent getUnsafeIntentLaunchTestIntent(Context context) { in getUnsafeIntentLaunchTestIntent()
68 public static Intent getUnsafeDataCopyFromIntentTestIntent(Context context) { in getUnsafeDataCopyFromIntentTestIntent()
79 public static Intent getUnsafeDataCopyFromExtrasTestIntent(Context context) { in getUnsafeDataCopyFromExtrasTestIntent()
89 public static Intent getDataCopyFromDeliveredIntentWithUnparceledExtrasTestIntent( in getDataCopyFromDeliveredIntentWithUnparceledExtrasTestIntent()
103 private static Intent getTestIntentWithExtrasInParceledIntent(Context context, String action) { in getTestIntentWithExtrasInParceledIntent()
104 Intent intent = getTestIntent(context, action); in getTestIntentWithExtrasInParceledIntent()
105 Intent innerIntent = intent.getParcelableExtra(EXTRA_INNER_INTENT); in getTestIntentWithExtrasInParceledIntent()
117 public static Intent getUnsafeIntentFromUriLaunchTestIntent(Context context) { in getUnsafeIntentFromUriLaunchTestIntent()
127 public static Intent getSafeIntentFromUriLaunchTestIntent(Context context) { in getSafeIntentFromUriLaunchTestIntent()
[all …]
/cts/tests/tests/match_flags/src/android/matchflags/cts/
DMatchFlagTests.java22 import android.content.Intent;
60 Intent onlyBrowserIntent = new Intent(Intent.ACTION_VIEW) in startNoBrowserIntentWithNoMatchingApps()
61 .addCategory(Intent.CATEGORY_BROWSABLE) in startNoBrowserIntentWithNoMatchingApps()
75 Intent noBrowserWithBrowserOnlyIntent = new Intent(onlyBrowserIntent) in startNoBrowserIntentWithNoMatchingApps()
76 .addFlags(Intent.FLAG_ACTIVITY_REQUIRE_NON_BROWSER); in startNoBrowserIntentWithNoMatchingApps()
88 Intent sharedIntent = new Intent("android.matchflags.app.SHARED_ACTION"); in startRequireDefaultWithNoDefault()
92 Intent sharedIntentRequireDefault = new Intent(sharedIntent) in startRequireDefaultWithNoDefault()
93 .addFlags(Intent.FLAG_ACTIVITY_REQUIRE_DEFAULT); in startRequireDefaultWithNoDefault()
105 Intent uniqueIntent = new Intent("android.matchflags.app.UNIQUE_ACTION") in startRequireDefaultWithSingleMatch()
106 .addFlags(Intent.FLAG_ACTIVITY_REQUIRE_DEFAULT); in startRequireDefaultWithSingleMatch()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DDisallowSharingIntoProfileTest.java25 import android.content.Intent;
53 private final List<Intent> sharingIntentsToProfile = Arrays.asList(
54 new Intent(Intent.ACTION_SEND).setType("*/*"),
55 new Intent(Intent.ACTION_SEND_MULTIPLE).setType("*/*"));
58 private final List<Intent> sharingIntentsToPersonal = new ArrayList<>(Arrays.asList(
59 new Intent(Intent.ACTION_GET_CONTENT).setType("*/*").addCategory(
60 Intent.CATEGORY_OPENABLE),
61 new Intent(Intent.ACTION_OPEN_DOCUMENT).setType("*/*").addCategory(
62 Intent.CATEGORY_OPENABLE),
63 new Intent(Intent.ACTION_PICK).setType("*/*").addCategory(
[all …]
DCrossProfileSharingTest.java26 import android.content.Intent;
48 Intent intent = getSendIntent(); in startSwitchToOtherProfileIntent()
61 Intent switchToOtherProfileIntent = new Intent(intent); in startSwitchToOtherProfileIntent()
63 switchToOtherProfileIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in startSwitchToOtherProfileIntent()
69 Intent intent = getSendIntent(); in startSwitchToOtherProfileIntent_chooser()
82 Intent chooserIntent = Intent.createChooser(intent, /* title */ null); in startSwitchToOtherProfileIntent_chooser()
83 Intent switchToOtherProfileIntent = new Intent(chooserIntent); in startSwitchToOtherProfileIntent_chooser()
85 switchToOtherProfileIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in startSwitchToOtherProfileIntent_chooser()
96 filter.addAction(Intent.ACTION_SEND); in addCrossProfileIntents()
97 filter.addCategory(Intent.CATEGORY_DEFAULT); in addCrossProfileIntents()
[all …]
/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/
DUriGrantsTest.java35 import android.content.Intent;
69 clip.addItem(new ClipData.Item(new Intent(Intent.ACTION_VIEW, grantClip3Uri))); in makeMultiClipData()
70 Intent intent = new Intent(Intent.ACTION_VIEW, grantClip4Uri); in makeMultiClipData()
71 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION in makeMultiClipData()
72 | Intent.FLAG_GRANT_WRITE_URI_PERMISSION); in makeMultiClipData()
74 intent = new Intent(Intent.ACTION_VIEW); in makeMultiClipData()
97 resolver.takePersistableUriPermission(target, Intent.FLAG_GRANT_READ_URI_PERMISSION); in testGrantPersistableUriPermission()
107 grantClipUriPermissionViaActivity(clip, Intent.FLAG_GRANT_READ_URI_PERMISSION in testGrantPersistableUriPermission()
108 | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION); in testGrantPersistableUriPermission()
119 resolver.takePersistableUriPermission(target, Intent.FLAG_GRANT_READ_URI_PERMISSION); in testGrantPersistableUriPermission()
[all …]
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerStartShortcutTest.java26 import android.content.Intent;
51 private List<Intent> launchShortcutAndGetIntents(Context launcher, Context client, in launchShortcutAndGetIntents()
57 private List<Intent> launchShortcutAndGetIntents(Context launcher, Context client, in launchShortcutAndGetIntents()
76 final List<Intent> launched = launchShortcutAndGetIntents(launcher, client, id, 1, in assertShortcutStarts()
92 private static final String[] EXPECTED_ACTIONS_SINGLE = new String[]{Intent.ACTION_MAIN};
101 Intent i = new Intent(Intent.ACTION_MAIN) in testStartSingle()
103 .setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION) in testStartSingle()
113 List<Intent> launched = launchShortcutAndGetIntents(mLauncherContext1, mPackageContext1, in testStartSingle()
116 assertEquals(Intent.ACTION_MAIN, launched.get(0).getAction()); in testStartSingle()
117 assertTrue((launched.get(0).getFlags() & Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0); in testStartSingle()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/media/
DMediaStoreIntentsTest.java24 import android.content.Intent;
71 public void assertCanBeHandled(Intent intent) { in assertCanBeHandled()
81 Intent intent = new Intent(Intent.ACTION_PICK); in testPickImageDir()
88 Intent intent = new Intent(Intent.ACTION_PICK); in testPickVideoDir()
95 Intent intent = new Intent(Intent.ACTION_PICK); in testPickAudioDir()
102 Intent intent = new Intent(Intent.ACTION_VIEW); in testViewImageDir()
109 Intent intent = new Intent(Intent.ACTION_VIEW); in testViewVideoDir()
126 Intent intent = new Intent(Intent.ACTION_VIEW); in testViewImageFile()
145 Intent intent = new Intent(Intent.ACTION_VIEW); in testViewVideoFile()
164 Intent intent = new Intent(Intent.ACTION_VIEW); in testViewAudioFile()
/cts/common/device-side/bedstead/testapp/src/main/testapps/java/com/android/bedstead/testapp/
DBaseTestAppDeviceAdminReceiver.java21 import android.content.Intent;
35 public void onEnabled(Context context, Intent intent) { in onEnabled()
40 public CharSequence onDisableRequested(Context context, Intent intent) { in onDisableRequested()
45 public void onDisabled(Context context, Intent intent) { in onDisabled()
50 public void onPasswordChanged(Context context, Intent intent) { in onPasswordChanged()
55 public void onPasswordChanged(Context context, Intent intent, UserHandle user) { in onPasswordChanged()
60 public void onPasswordFailed(Context context, Intent intent) { in onPasswordFailed()
65 public void onPasswordFailed(Context context, Intent intent, UserHandle user) { in onPasswordFailed()
70 public void onPasswordSucceeded(Context context, Intent intent) { in onPasswordSucceeded()
75 public void onPasswordSucceeded(Context context, Intent intent, UserHandle user) { in onPasswordSucceeded()
[all …]
/cts/hostsidetests/appsecurity/test-apps/EphemeralTestApp/NormalApp/src/com/android/cts/normalapp/
DClientTest.java37 import android.content.Intent;
99 filter.addCategory(Intent.CATEGORY_DEFAULT); in setUp()
114 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
137 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
162 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
171 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
182 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
205 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
230 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
239 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
[all …]
/cts/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/
DBackgroundActivityLaunchTest.java53 import android.content.Intent;
145 Intent intent = new Intent(); in testBackgroundActivityBlocked()
178 Intent firstIntent = new Intent(); in testBackgroundActivityNotBlockedWithinGracePeriod()
180 firstIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testBackgroundActivityNotBlockedWithinGracePeriod()
185 mContext.sendBroadcast(new Intent(ACTION_FINISH_ACTIVITY)); in testBackgroundActivityNotBlockedWithinGracePeriod()
187 Intent secondIntent = new Intent(); in testBackgroundActivityNotBlockedWithinGracePeriod()
203 Intent intent = new Intent(); in testBackgroundActivityNotBlockedWhenSystemAlertWindowGranted()
213 Intent intent = new Intent(); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
215 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
222 intent = new Intent(); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
[all …]
/cts/tests/app/app/src/android/app/stubs/
DCommandReceiver.java26 import android.content.Intent;
89 private static ArrayMap<String, Intent> sActivityIntent = new ArrayMap<>();
103 public void onReceive(Context context, Intent intent) { in onReceive()
176 private void doBindService(Context context, Intent commandIntent, String serviceName) { in doBindService()
180 Intent bindIntent = new Intent(); in doBindService()
188 private void doUnbindService(Context context, Intent commandIntent) { in doUnbindService()
193 private void doStartForegroundService(Context context, Intent commandIntent) { in doStartForegroundService()
195 Intent fgsIntent = new Intent(); in doStartForegroundService()
208 private void doStartService(Context context, Intent commandIntent) { in doStartService()
210 Intent fgsIntent = new Intent(); in doStartService()
[all …]
DLocalActivityManagerTestHelper.java23 import android.content.Intent;
91 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testRemoveAllActivity()
92 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testRemoveAllActivity()
119 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testDispatchDestroy()
120 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testDispatchDestroy()
161 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testSaveInstanceState()
162 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testSaveInstanceState()
180 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testDispatchPauseFalse()
181 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testDispatchPauseFalse()
194 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testDispatchPauseTrue()
[all …]
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/
DContactsContractIntentsTest.java19 import android.content.Intent;
31 public void assertCanBeHandled(Intent intent) { in assertCanBeHandled()
40 Intent intent = new Intent(Intent.ACTION_VIEW); in testViewContactDir()
46 Intent intent = new Intent(Intent.ACTION_PICK); in testPickContactDir()
52 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); in testGetContentContactDir()
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/
DContentTest.java22 import android.content.Intent;
85 Intent intent = new Intent(ACTION_READ_FROM_URI); in testReceiverCanRead()
87 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); in testReceiverCanRead()
89 final Intent result = mActivity.getCrossProfileResult(intent); in testReceiverCanRead()
105 Intent intent = new Intent(ACTION_WRITE_TO_URI); in testReceiverCanWrite()
108 intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION in testReceiverCanWrite()
109 | Intent.FLAG_GRANT_READ_URI_PERMISSION); in testReceiverCanWrite()
120 Intent intent = new Intent(ACTION_READ_FROM_URI); in testPersistablePermission()
123 final Intent result = mActivity.getCrossProfileResult(intent); in testPersistablePermission()
149 Intent notGrant = new Intent(ACTION_READ_FROM_URI); in testAppPermissionsDontWorkAcrossProfiles()
[all …]
/cts/tests/tests/settings/src/android/settings/cts/
DSettingsHandlerTest.java21 import android.content.Intent;
48 Intent intent = new Intent(Intent.ACTION_VIEW); in oneDefaultHandlerForVideoRoot()
57 Intent intent = new Intent(Intent.ACTION_VIEW); in oneDefaultHandlerForImageRoot()
66 Intent intent = new Intent(Intent.ACTION_VIEW); in oneDefaultHandlerForAudioRoot()
75 Intent intent = new Intent(Intent.ACTION_VIEW); in oneDefaultHandlerForDocumentRoot()
84 Intent intent = new Intent(StorageManager.ACTION_MANAGE_STORAGE); in oneDefaultHandlerForManageStorage()
89 private boolean hasAtMostOneDefaultHandlerForIntent(Intent intent) { in hasAtMostOneDefaultHandlerForIntent()
/cts/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/
DClientTest.java44 import android.content.Intent;
124 filter.addCategory(Intent.CATEGORY_DEFAULT); in setUp()
139 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
162 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
185 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
208 final Intent queryIntent = new Intent(Intent.ACTION_VIEW); in testQuery()
209 queryIntent.addCategory(Intent.CATEGORY_BROWSABLE); in testQuery()
233 final Intent queryIntent = new Intent(Intent.ACTION_VIEW); in testQuery()
234 queryIntent.addCategory(Intent.CATEGORY_BROWSABLE); in testQuery()
253 final Intent queryIntent = new Intent(ACTION_QUERY); in testQuery()
[all …]
/cts/hostsidetests/incident/apps/errorsapp/src/com/android/server/cts/errors/
DErrorsTests.java21 import android.content.Intent;
67 Intent intent = new Intent(); in testException()
69 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testException()
86 Intent intent = new Intent(); in testANR()
88 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testANR()
91 final Intent receiverIntent = new Intent(mContext, Receiver.class); in testANR()
108 Intent intent = new Intent(); in testNativeCrash()
110 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testNativeCrash()
126 Intent intent = new Intent(); in testTombstone()
128 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testTombstone()

12345678910>>...62