Home
last modified time | relevance | path

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

12345678910>>...35

/cts/tests/tests/content/src/android/content/cts/
DAvailableIntentsTest.java56 private void assertCanBeHandled(final Intent intent) { in assertCanBeHandled() argument
58 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertCanBeHandled()
68 private void assertDefaultHandlerValidPriority(final Intent intent) { in assertDefaultHandlerValidPriority() argument
70 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertDefaultHandlerValidPriority()
87 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewNormalUrl() local
88 assertCanBeHandled(intent); in testViewNormalUrl()
97 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewSecureUrl() local
98 assertCanBeHandled(intent); in testViewSecureUrl()
107 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchNormalUrl() local
108 intent.putExtra(SearchManager.QUERY, uri); in testWebSearchNormalUrl()
[all …]
/cts/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/
DBackgroundActivityLaunchTest.java132 Intent intent = new Intent(); in testBackgroundActivityBlocked() local
133 intent.setComponent(APP_A_START_ACTIVITY_RECEIVER); in testBackgroundActivityBlocked()
134 mContext.sendBroadcast(intent); in testBackgroundActivityBlocked()
159 Intent intent = new Intent(); in testBackgroundActivityNotBlockedWhenSystemAlertWindowGranted() local
160 intent.setComponent(APP_A_START_ACTIVITY_RECEIVER); in testBackgroundActivityNotBlockedWhenSystemAlertWindowGranted()
161 mContext.sendBroadcast(intent); in testBackgroundActivityNotBlockedWhenSystemAlertWindowGranted()
169 Intent intent = new Intent(); in testBackgroundActivityNotBlockedWhenForegroundActivityExists() local
170 intent.setComponent(APP_A_FOREGROUND_ACTIVITY); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
171 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
172 mContext.startActivity(intent); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/
DMediaStoreIntentsTest.java67 public void assertCanBeHandled(Intent intent) { in assertCanBeHandled() argument
69 .getPackageManager().queryIntentActivities(intent, 0); in assertCanBeHandled()
71 assertTrue("No ResolveInfo found for " + intent.toString(), in assertCanBeHandled()
77 Intent intent = new Intent(Intent.ACTION_PICK); in testPickImageDir() local
78 intent.setData(mExternalImages); in testPickImageDir()
79 assertCanBeHandled(intent); in testPickImageDir()
84 Intent intent = new Intent(Intent.ACTION_PICK); in testPickVideoDir() local
85 intent.setData(mExternalVideo); in testPickVideoDir()
86 assertCanBeHandled(intent); in testPickVideoDir()
91 Intent intent = new Intent(Intent.ACTION_PICK); in testPickAudioDir() local
[all …]
/cts/tests/app/src/android/app/cts/
DRemoteInputTest.java114 Intent intent = new Intent(); in testRemoteInputBuilder_addAndGetDataResultsFromIntent() local
117 RemoteInput.addDataResultToIntent(input, intent, putResults); in testRemoteInputBuilder_addAndGetDataResultsFromIntent()
119 verifyIntentHasDataResults(intent, uri); in testRemoteInputBuilder_addAndGetDataResultsFromIntent()
125 Intent intent = new Intent(); in testRemoteInputBuilder_addAndGetTextResultsFromIntent() local
130 RemoteInput.addResultsToIntent(arr, intent, putResults); in testRemoteInputBuilder_addAndGetTextResultsFromIntent()
132 verifyIntentHasTextResults(intent, charSequence); in testRemoteInputBuilder_addAndGetTextResultsFromIntent()
140 Intent intent = new Intent(); in testRemoteInputBuilder_addAndGetDataAndTextResultsFromIntentDataFirst() local
142 addDataResultsToIntent(input, intent, uri); in testRemoteInputBuilder_addAndGetDataAndTextResultsFromIntentDataFirst()
143 addTextResultsToIntent(input, intent, charSequence); in testRemoteInputBuilder_addAndGetDataAndTextResultsFromIntentDataFirst()
144 RemoteInput.setResultsSource(intent, RemoteInput.SOURCE_FREE_FORM_INPUT); in testRemoteInputBuilder_addAndGetDataAndTextResultsFromIntentDataFirst()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPolicyTransparencyTest.java35 Intent intent = mDevicePolicyManager.createAdminSupportIntent( in testCameraDisabled() local
37 assertNotNull(intent); in testCameraDisabled()
39 (ComponentName) intent.getParcelableExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN)); in testCameraDisabled()
41 intent.getStringExtra(DevicePolicyManager.EXTRA_RESTRICTION)); in testCameraDisabled()
44 intent = mDevicePolicyManager.createAdminSupportIntent( in testCameraDisabled()
46 assertNull(intent); in testCameraDisabled()
52 Intent intent = mDevicePolicyManager.createAdminSupportIntent( in testScreenCaptureDisabled() local
54 assertNotNull(intent); in testScreenCaptureDisabled()
56 (ComponentName) intent.getParcelableExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN)); in testScreenCaptureDisabled()
58 intent.getStringExtra(DevicePolicyManager.EXTRA_RESTRICTION)); in testScreenCaptureDisabled()
[all …]
DDelegatedCertInstallerTest.java154 public void onReceive(Context context, Intent intent) {
155 if (ACTION_CERT_OPERATION_DONE.equals(intent.getAction())) {
157 mReceivedResult = intent.getBooleanExtra(EXTRA_RESULT_VALUE, false);
159 (Exception) intent.getSerializableExtra(EXTRA_RESULT_EXCEPTION);
317 Intent intent = new Intent(); in installCaCert() local
318 intent.setAction(ACTION_INSTALL_CERT); in installCaCert()
319 intent.setComponent(CERT_INSTALLER_COMPONENT); in installCaCert()
320 intent.putExtra(EXTRA_CERT_DATA, cert); in installCaCert()
321 intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); in installCaCert()
322 mContext.sendBroadcast(intent); in installCaCert()
[all …]
DLockTaskUtilityActivity.java68 protected void onNewIntent(Intent intent) { in onNewIntent() argument
69 super.onNewIntent(intent); in onNewIntent()
70 handleIntent(intent); in onNewIntent()
100 private void handleIntent(Intent intent) { in handleIntent() argument
101 if (intent.getBooleanExtra(START_LOCK_TASK, false)) { in handleIntent()
104 if (intent.getBooleanExtra(STOP_LOCK_TASK, false)) { in handleIntent()
107 if (intent.hasExtra(START_ACTIVITY)) { in handleIntent()
108 Intent i = intent.getParcelableExtra(START_ACTIVITY); in handleIntent()
111 if (intent.getBooleanExtra(FINISH, false)) { in handleIntent()
117 private void sendLocalBroadcast(Intent intent) { in sendLocalBroadcast() argument
[all …]
/cts/hostsidetests/devicepolicy/app/DelegateApp/src/com/android/cts/delegate/
DDelegatedScopesReceiverActivity.java52 public void onReceive(Context context, Intent intent) {
53 if (ACTION_APPLICATION_DELEGATION_SCOPES_CHANGED.equals(intent.getAction())) {
54 handleIntent(intent);
66 protected void onNewIntent(Intent intent) { in onNewIntent() argument
67 super.onNewIntent(intent); in onNewIntent()
68 handleIntent(intent); in onNewIntent()
86 private void handleIntent(Intent intent) { in handleIntent() argument
87 if (intent == null) { in handleIntent()
91 if (ACTION_APPLICATION_DELEGATION_SCOPES_CHANGED.equals(intent.getAction())) { in handleIntent()
92 final List<String> scopes = intent.getStringArrayListExtra(EXTRA_DELEGATION_SCOPES); in handleIntent()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DNfcTest.java32 Intent intent = getTextShareIntent(); in testNfcShareDisabled() local
35 waitForNfcBeamActivityDisabled(intent, NFC_RESOLVE_TIMEOUT_MILLIS); in testNfcShareDisabled()
36 assertFalse("Nfc beam activity should not be resolved", isNfcBeamActivityResolved(intent)); in testNfcShareDisabled()
40 Intent intent = getTextShareIntent(); in testNfcShareEnabled() local
41 assertTrue("Nfc beam activity should be resolved", isNfcBeamActivityResolved(intent)); in testNfcShareEnabled()
44 private void waitForNfcBeamActivityDisabled(Intent intent, int maxDelayMillis) in waitForNfcBeamActivityDisabled() argument
47 while (isNfcBeamActivityResolved(intent) && totalDelayedMillis <= maxDelayMillis) { in waitForNfcBeamActivityDisabled()
54 Intent intent = new Intent(); in getTextShareIntent() local
55 intent.setAction(Intent.ACTION_SEND); in getTextShareIntent()
56 intent.putExtra(Intent.EXTRA_TEXT, SAMPLE_TEXT); in getTextShareIntent()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBleEncryptedClientService.java129 public IBinder onBind(Intent intent) { in onBind() argument
164 Intent intent = new Intent(INTENT_BLE_BLUETOOTH_DISABLED); in notifyBluetoothDisabled() local
165 sendBroadcast(intent); in notifyBluetoothDisabled()
169 Intent intent = new Intent(ACTION_DISCONNECTED); in notifyDisconnected() local
170 sendBroadcast(intent); in notifyDisconnected()
174 public int onStartCommand(Intent intent, int flags, int startId) { in onStartCommand() argument
178 if (intent != null) { in onStartCommand()
179 mAction = intent.getAction(); in onStartCommand()
181 mSecure = intent.getBooleanExtra(BleEncryptedServerService.EXTRA_SECURE, false); in onStartCommand()
330 Intent intent;
[all …]
/cts/tests/app/app/src/android/app/stubs/
DLocalActivityManagerTestHelper.java91 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testRemoveAllActivity() local
92 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testRemoveAllActivity()
93 mLocalActivityManager.startActivity(id, intent); in testRemoveAllActivity()
119 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testDispatchDestroy() local
120 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testDispatchDestroy()
121 mLocalActivityManager.startActivity(id1, intent); in testDispatchDestroy()
135 mLocalActivityManager.startActivity(id2, intent); in testDispatchDestroy()
161 final Intent intent = new Intent(this, LocalActivityManagerStubActivity.class); in testSaveInstanceState() local
162 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testSaveInstanceState()
163 mLocalActivityManager.startActivity(id, intent); in testSaveInstanceState()
[all …]
DLaunchpadActivity.java286 final Intent intent = getIntent(); in onResume() local
287 intent.setFlags(0); in onResume()
288 intent.setComponent((ComponentName) intent.getParcelableExtra("component")); in onResume()
289 startActivityForResult(intent, LAUNCHED_RESULT); in onResume()
293 final Intent intent = getIntent(); in onResume() local
294 intent.setFlags(0); in onResume()
295 intent.setClass(this, LocalScreen.class); in onResume()
296 startActivityForResult(intent, FORWARDED_RESULT); in onResume()
299 final Intent intent = getIntent(); in onResume() local
300 intent.setFlags(0); in onResume()
[all …]
DCommandReceiver.java58 public void onReceive(Context context, Intent intent) { in onReceive() argument
61 int command = intent.getIntExtra(EXTRA_COMMAND, -1); in onReceive()
63 + intent); in onReceive()
66 doBindService(context, intent); in onReceive()
69 doUnbindService(context, intent); in onReceive()
78 int type = intent.getIntExtra( in onReceive()
127 private String getTargetPackage(Intent intent) { in getTargetPackage() argument
128 return intent.getStringExtra(EXTRA_TARGET_PACKAGE); in getTargetPackage()
131 private int getFlags(Intent intent) { in getFlags() argument
132 return intent.getIntExtra(EXTRA_FLAGS, 0); in getFlags()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DLaunchpadActivity.java280 final Intent intent = getIntent(); in onResume() local
281 intent.setFlags(0); in onResume()
282 intent.setComponent((ComponentName) intent.getParcelableExtra("component")); in onResume()
283 startActivityForResult(intent, LAUNCHED_RESULT); in onResume()
286 final Intent intent = getIntent(); in onResume() local
287 intent.setFlags(0); in onResume()
288 intent.setClass(this, LocalScreen.class); in onResume()
289 startActivityForResult(intent, FORWARDED_RESULT); in onResume()
292 final Intent intent = getIntent(); in onResume() local
293 intent.setFlags(0); in onResume()
[all …]
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/
DDocumentsClientTest.java143 final Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); in testOpenSimple() local
144 intent.addCategory(Intent.CATEGORY_OPENABLE); in testOpenSimple()
145 intent.setType("*/*"); in testOpenSimple()
146 mActivity.startActivityForResult(intent, REQUEST_CODE); in testOpenSimple()
184 final Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); in testOpenVirtual()
185 intent.setType("*/*"); in testOpenVirtual()
186 mActivity.startActivityForResult(intent, REQUEST_CODE); in testOpenVirtual()
224 final Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); in testCreateNew() local
225 intent.addCategory(Intent.CATEGORY_OPENABLE); in testCreateNew()
226 intent.putExtra(Intent.EXTRA_TITLE, DISPLAY_NAME); in testCreateNew()
[all …]
/cts/hostsidetests/inputmethodservice/deviceside/lib/src/android/inputmethodservice/cts/ime/
DImeCommandReceiver.java66 public void onReceive(Context context, Intent intent) { in onReceive() argument
67 final String command = intent.getStringExtra(ImeCommandConstants.EXTRA_COMMAND); in onReceive()
74 final CharSequence text = getCharSequence1(intent); in onReceive()
75 final int newCursorPosition = getInt1(intent); in onReceive()
80 final String imeId = getString1(intent); in onReceive()
85 final int flags = getInt1(intent); in onReceive()
90 final String imeId = getString1(intent); in onReceive()
109 private static CharSequence getCharSequence1(Intent intent) { in getCharSequence1() argument
110 return intent.getCharSequenceExtra(ImeCommandConstants.EXTRA_ARG_CHARSEQUENCE1); in getCharSequence1()
113 private static String getString1(Intent intent) { in getString1() argument
[all …]
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContactsContractIntentsTest.java31 public void assertCanBeHandled(Intent intent) { in assertCanBeHandled() argument
33 .getPackageManager().queryIntentActivities(intent, 0); in assertCanBeHandled()
35 assertTrue("No ResolveInfo found for " + intent.toString(), 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/incident/apps/errorsapp/src/com/android/server/cts/errors/
DErrorsTests.java67 Intent intent = new Intent(); in testException() local
68 intent.setClass(mContext, ExceptionActivity.class); in testException()
69 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testException()
70 mContext.startActivity(intent); in testException()
86 Intent intent = new Intent(); in testANR() local
87 intent.setClass(mContext, ANRActivity.class); in testANR()
88 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testANR()
89 mContext.startActivity(intent); in testANR()
108 Intent intent = new Intent(); in testNativeCrash() local
109 intent.setClass(mContext, NativeActivity.class); in testNativeCrash()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DBasicAdminReceiver.java43 public void onUserAdded(Context context, Intent intent, UserHandle userHandle) { in onUserAdded() argument
44 super.onUserAdded(context, intent, userHandle); in onUserAdded()
49 public void onUserRemoved(Context context, Intent intent, UserHandle userHandle) { in onUserRemoved() argument
50 super.onUserRemoved(context, intent, userHandle); in onUserRemoved()
55 public void onUserStarted(Context context, Intent intent, UserHandle userHandle) { in onUserStarted() argument
56 super.onUserStarted(context, intent, userHandle); in onUserStarted()
61 public void onUserStopped(Context context, Intent intent, UserHandle userHandle) { in onUserStopped() argument
62 super.onUserStopped(context, intent, userHandle); in onUserStopped()
67 public void onUserSwitched(Context context, Intent intent, UserHandle userHandle) { in onUserSwitched() argument
68 super.onUserSwitched(context, intent, userHandle); in onUserSwitched()
[all …]
/cts/libs/install/src/com/android/cts/install/lib/
DLocalIntentSender.java42 public void onReceive(Context context, Intent intent) { in onReceive() argument
43 Log.i(TAG, "Received intent " + prettyPrint(intent)); in onReceive()
44 sIntentSenderResults.add(intent); in onReceive()
52 Intent intent = new Intent(context, LocalIntentSender.class); in getIntentSender() local
53 PendingIntent pending = PendingIntent.getBroadcast(context, 0, intent, 0); in getIntentSender()
61 Intent intent = sIntentSenderResults.take(); in getIntentSenderResult() local
62 Log.i(TAG, "Taking intent " + prettyPrint(intent)); in getIntentSenderResult()
63 return intent; in getIntentSenderResult()
66 private static String prettyPrint(Intent intent) { in prettyPrint() argument
67 int sessionId = intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID, -1); in prettyPrint()
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/intent/
DLaunchSequence.java17 package android.server.wm.intent;
22 import android.server.wm.intent.Persistence.LaunchFromIntent;
23 import android.server.wm.intent.Persistence.LaunchIntent;
97 static LaunchSequence create(LaunchIntent intent) { in create() argument
98 return new RootLaunch(intent.withFlags(Cases.NEW_TASK)); in create()
106 default LaunchSequence append(LaunchIntent intent) { in append() argument
107 return new ConsecutiveLaunch(this, intent, false, Optional.empty()); in append()
117 default LaunchSequence append(LaunchIntent intent, LaunchSequence launchFrom) { in append() argument
118 return new ConsecutiveLaunch(this, intent, false, Optional.of(launchFrom)); in append()
125 default LaunchSequence act(LaunchIntent intent) { in act() argument
[all …]
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/
DContentTest.java17 package com.android.cts.intent.sender;
85 Intent intent = new Intent(ACTION_READ_FROM_URI); in testReceiverCanRead() local
86 intent.setClipData(ClipData.newRawUri("", 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() local
106 intent.setClipData(ClipData.newRawUri("", uri)); in testReceiverCanWrite()
107 intent.putExtra("extra_message", MESSAGE); in testReceiverCanWrite()
108 intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION in testReceiverCanWrite()
111 mActivity.getCrossProfileResult(intent); in testReceiverCanWrite()
[all …]
/cts/apps/NotificationBot/src/com/android/cts/robot/
DNotificationBot.java61 public void onReceive(Context context, Intent intent) { in onReceive() argument
62 Log.i(TAG, "received intent: " + intent); in onReceive()
63 if (ACTION_POST.equals(intent.getAction())) { in onReceive()
65 if (!intent.hasExtra(EXTRA_NOTIFICATION) || !intent.hasExtra(EXTRA_ID)) { in onReceive()
69 int id = intent.getIntExtra(EXTRA_ID, -1); in onReceive()
71 Notification n = (Notification) intent.getParcelableExtra(EXTRA_NOTIFICATION); in onReceive()
77 } else if (ACTION_CANCEL.equals(intent.getAction())) { in onReceive()
79 int id = intent.getIntExtra(EXTRA_ID, -1); in onReceive()
89 } else if (ACTION_RESET_SETUP_NOTIFICATION.equals(intent.getAction())) { in onReceive()
90 testShortcutResetSetupNotification(context, intent); in onReceive()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DSetNewPasswordComplexityTest.java22 Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD); in onCreate()
23 intent.putExtra(DevicePolicyManager.EXTRA_PASSWORD_COMPLEXITY, in onCreate()
25 startActivity(intent); in onCreate()
29 Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD); in onCreate()
30 intent.putExtra(DevicePolicyManager.EXTRA_PASSWORD_COMPLEXITY, in onCreate()
32 startActivity(intent); in onCreate()
36 Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD); in onCreate()
37 intent.putExtra(DevicePolicyManager.EXTRA_PASSWORD_COMPLEXITY, in onCreate()
39 startActivity(intent); in onCreate()
43 Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD); in onCreate()
[all …]
/cts/tests/tests/externalservice/src/android/externalservice/cts/
DExternalServiceTest.java56 Intent intent = new Intent(); in testFailBindIsolated() local
57 intent.setComponent(new ComponentName(sServicePackage, sServicePackage+".IsolatedService")); in testFailBindIsolated()
59 getContext().bindService(intent, mConnection, Context.BIND_AUTO_CREATE); in testFailBindIsolated()
67 Intent intent = new Intent(); in testFailBindExternalIsolated() local
68 intent.setComponent(new ComponentName(sServicePackage, sServicePackage+".IsolatedService")); in testFailBindExternalIsolated()
70 getContext().bindService(intent, mConnection, in testFailBindExternalIsolated()
80 Intent intent = new Intent(); in testFailBindExternalExported() local
81 intent.setComponent(new ComponentName(sServicePackage, sServicePackage+".ExportedService")); in testFailBindExternalExported()
83 getContext().bindService(intent, mConnection, in testFailBindExternalExported()
92 Intent intent = new Intent(); in testFailBindExternalNonExported() local
[all …]

12345678910>>...35