Home
last modified time | relevance | path

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

12345678910>>...33

/cts/tests/tests/content/src/android/content/cts/
DAvailableIntentsTest.java55 private void assertCanBeHandled(final Intent intent) { in assertCanBeHandled() argument
57 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertCanBeHandled()
67 private void assertDefaultHandlerValidPriority(final Intent intent) { in assertDefaultHandlerValidPriority() argument
69 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertDefaultHandlerValidPriority()
86 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewNormalUrl() local
87 assertCanBeHandled(intent); in testViewNormalUrl()
96 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewSecureUrl() local
97 assertCanBeHandled(intent); in testViewSecureUrl()
106 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchNormalUrl() local
107 intent.putExtra(SearchManager.QUERY, uri); in testWebSearchNormalUrl()
[all …]
/cts/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/
DBackgroundActivityLaunchTest.java120 Intent intent = new Intent(); in testBackgroundActivityBlocked() local
121 intent.setComponent(APP_A_START_ACTIVITY_RECEIVER); in testBackgroundActivityBlocked()
122 mContext.sendBroadcast(intent); in testBackgroundActivityBlocked()
142 Intent intent = new Intent(); in testBackgroundActivityNotBlockedWhenForegroundActivityExists() local
143 intent.setComponent(APP_A_FOREGROUND_ACTIVITY); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
144 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
145 mContext.startActivity(intent); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
151 intent = new Intent(); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
152 intent.setComponent(APP_A_START_ACTIVITY_RECEIVER); in testBackgroundActivityNotBlockedWhenForegroundActivityExists()
153 mContext.sendBroadcast(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/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 …]
/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/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/DeviceOwner/src/com/android/cts/deviceowner/
DLockTaskUtilityActivity.java38 protected void onNewIntent(Intent intent) { in onNewIntent() argument
39 super.onNewIntent(intent); in onNewIntent()
40 handleIntent(intent); in onNewIntent()
68 private void handleIntent(Intent intent) { in handleIntent() argument
69 if (intent.getBooleanExtra(START_LOCK_TASK, false)) { in handleIntent()
72 if (intent.getBooleanExtra(STOP_LOCK_TASK, false)) { in handleIntent()
75 if (intent.hasExtra(START_ACTIVITY)) { in handleIntent()
76 Intent i = intent.getParcelableExtra(START_ACTIVITY); in handleIntent()
79 if (intent.getBooleanExtra(FINISH, false)) { in handleIntent()
85 private void sendLocalBroadcast(Intent intent) { in sendLocalBroadcast() argument
[all …]
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/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/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/hostsidetests/stagedinstall/app/src/com/android/tests/stagedinstall/
DLocalIntentSender.java37 public void onReceive(Context context, Intent intent) { in onReceive() argument
38 Log.i(TAG, "Received intent " + prettyPrint(intent)); in onReceive()
39 sIntentSenderResults.add(intent); in onReceive()
47 Intent intent = new Intent(context, LocalIntentSender.class); in getIntentSender() local
48 PendingIntent pending = PendingIntent.getBroadcast(context, 0, intent, 0); in getIntentSender()
56 Intent intent = sIntentSenderResults.take(); in getIntentSenderResult() local
57 Log.i(TAG, "Taking intent " + prettyPrint(intent)); in getIntentSenderResult()
58 return intent; in getIntentSenderResult()
61 private static String prettyPrint(Intent intent) { in prettyPrint() argument
62 int sessionId = intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID, -1); in prettyPrint()
[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 …]
DCommandReceiver.java58 public void onReceive(Context context, Intent intent) { in onReceive() argument
59 int command = intent.getIntExtra(EXTRA_COMMAND, -1); in onReceive()
61 + intent); in onReceive()
64 doBindService(context, intent); in onReceive()
67 doUnbindService(context, intent); in onReceive()
76 int type = intent.getIntExtra( in onReceive()
130 private String getTargetPackage(Intent intent) { in getTargetPackage() argument
131 return intent.getStringExtra(EXTRA_TARGET_PACKAGE); in getTargetPackage()
134 private int getFlags(Intent intent) { in getFlags() argument
135 return intent.getIntExtra(EXTRA_FLAGS, 0); in getFlags()
[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 …]
/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/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/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/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/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/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/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/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/tests/tests/libcorefileio/src/android/cts/
DLockHoldingService.java102 public IBinder onBind(Intent intent) { in onBind() argument
107 public int onStartCommand(Intent intent, int flags, int startID) { in onStartCommand() argument
109 if (intent.getBooleanExtra(LOCK_BEHAVIOR_RELEASE_AND_NOTIFY_KEY, false)) { in onStartCommand()
110 acquireLockAndThenWaitThenRelease(intent); in onStartCommand()
112 acquireLock(intent); in onStartCommand()
123 private void acquireLock(Intent intent) throws IOException, in acquireLock() argument
125 LockType lockType = (LockType) intent.getSerializableExtra(LOCK_TYPE_KEY); in acquireLock()
126 ChannelType channelType = (ChannelType) intent.getSerializableExtra(CHANNEL_TYPE_KEY); in acquireLock()
141 private void acquireLockAndThenWaitThenRelease(Intent intent) in acquireLockAndThenWaitThenRelease() argument
143 long lockHoldTimeMillis = intent.getLongExtra(TIME_TO_HOLD_LOCK_KEY, 0); in acquireLockAndThenWaitThenRelease()
[all …]
/cts/hostsidetests/incident/apps/errorsapp/src/com/android/server/cts/errors/
DErrorsTests.java74 Intent intent = new Intent(); in testException() local
75 intent.setClass(mContext, ExceptionActivity.class); in testException()
76 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testException()
77 mContext.startActivity(intent); in testException()
90 Intent intent = new Intent(); in testANR() local
91 intent.setClass(mContext, ANRActivity.class); in testANR()
92 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in testANR()
93 mContext.startActivity(intent); in testANR()
108 Intent intent = new Intent(); in testNativeCrash() local
109 intent.setClass(mContext, NativeActivity.class); in testNativeCrash()
[all …]

12345678910>>...33