/cts/tests/tests/content/src/android/content/cts/ |
D | AvailableIntentsTest.java | 42 private void assertCanBeHandled(final Intent intent) { in assertCanBeHandled() argument 44 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertCanBeHandled() 56 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewNormalUrl() local 57 assertCanBeHandled(intent); in testViewNormalUrl() 66 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in testViewSecureUrl() local 67 assertCanBeHandled(intent); in testViewSecureUrl() 76 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchNormalUrl() local 77 intent.putExtra(SearchManager.QUERY, uri); in testWebSearchNormalUrl() 78 assertCanBeHandled(intent); in testWebSearchNormalUrl() 87 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); in testWebSearchSecureUrl() local [all …]
|
D | ReadableUriExtraToClipDataTest.java | 54 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/ |
D | MediaStoreIntentsTest.java | 32 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 …]
|
D | ContactsContractIntentsTest.java | 31 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 …]
|
D | ContactsContract_QuickContactsTest.java | 49 public void startActivity(Intent intent) { in testPrioritizedMimeTypeAndExcludedMimeTypes() 50 testCallback(intent); in testPrioritizedMimeTypeAndExcludedMimeTypes() 54 public void startActivityAsUser(Intent intent, UserHandle user) { in testPrioritizedMimeTypeAndExcludedMimeTypes() 55 testCallback(intent); in testPrioritizedMimeTypeAndExcludedMimeTypes() 59 public void startActivityAsUser(Intent intent, Bundle options, UserHandle user) { in testPrioritizedMimeTypeAndExcludedMimeTypes() 60 testCallback(intent); in testPrioritizedMimeTypeAndExcludedMimeTypes() 63 private void testCallback(Intent intent) { in testPrioritizedMimeTypeAndExcludedMimeTypes() 64 assertEquals(PLAIN_MIME_TYPE, intent.getStringExtra( in testPrioritizedMimeTypeAndExcludedMimeTypes() 67 = intent.getStringArrayExtra(QuickContact.EXTRA_EXCLUDE_MIMES); in testPrioritizedMimeTypeAndExcludedMimeTypes()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | NfcTest.java | 31 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/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | DelegatedCertInstallerTest.java | 143 public void onReceive(Context context, Intent intent) { 144 if (ACTION_CERT_OPERATION_DONE.equals(intent.getAction())) { 146 mReceivedResult = intent.getBooleanExtra(EXTRA_RESULT_VALUE, false); 148 (Exception) intent.getSerializableExtra(EXTRA_RESULT_EXCEPTION); 243 Intent intent = new Intent(); in installCaCert() local 244 intent.setAction(ACTION_INSTALL_CERT); in installCaCert() 245 intent.putExtra(EXTRA_CERT_DATA, cert); in installCaCert() 246 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in installCaCert() 247 mContext.startActivity(intent); in installCaCert() 251 Intent intent = new Intent(); in removeCaCert() local [all …]
|
D | ApplicationRestrictionsActivity.java | 48 public void onReceive(Context context, Intent intent) { 55 Intent intent = new Intent(RESTRICTION_ACTION); in broadcastRestriction() local 56 intent.putExtra("value", restrictions); in broadcastRestriction() 57 sendBroadcast(intent); in broadcastRestriction() 61 protected void onNewIntent(Intent intent) { in onNewIntent() argument 62 super.onNewIntent(intent); in onNewIntent() 63 handleIntent(intent); in onNewIntent() 87 private void handleIntent(Intent intent) { in handleIntent() argument 88 if (intent.getBooleanExtra(FINISH, false)) { in handleIntent()
|
/cts/tests/app/src/android/app/cts/ |
D | LocalActivityManagerTestHelper.java | 90 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 …]
|
D | LaunchpadActivity.java | 282 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/assist/src/android/assist/cts/ |
D | TestStartActivity.java | 59 Intent intent = new Intent(); in startTest() local 60 intent.putExtra(Utils.TESTCASE_TYPE, testCaseName); in startTest() 61 intent.setAction("android.intent.action.START_TEST_" + testCaseName); in startTest() 62 intent.setComponent(new ComponentName("android.assist.service", in startTest() 64 startActivity(intent); in startTest() 68 Intent intent = new Intent(); in start3pApp() local 69 intent.setAction("android.intent.action.TEST_APP_" + testCaseName); in start3pApp() 70 intent.setComponent(Utils.getTestAppComponent(testCaseName)); in start3pApp() 71 startActivity(intent); in start3pApp() 75 Intent intent = new Intent(); in start3pAppWithColor() local [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | LockTaskUtilityActivity.java | 36 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/os/src/android/os/cts/ |
D | LaunchpadActivity.java | 282 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/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/src/com/android/cts/permissiondeclareapp/ |
D | GrantUriPermission.java | 44 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/apps/NotificationBot/src/com/android/cts/robot/ |
D | NotificationBot.java | 35 public void onReceive(Context context, Intent intent) { in onReceive() argument 36 Log.i(TAG, "received intent: " + intent); in onReceive() 37 if (ACTION_POST.equals(intent.getAction())) { in onReceive() 39 if (!intent.hasExtra(EXTRA_NOTIFICATION) || !intent.hasExtra(EXTRA_ID)) { in onReceive() 43 int id = intent.getIntExtra(EXTRA_ID, -1); in onReceive() 45 Notification n = (Notification) intent.getParcelableExtra(EXTRA_NOTIFICATION); in onReceive() 51 } else if (ACTION_CANCEL.equals(intent.getAction())) { in onReceive() 53 int id = intent.getIntExtra(EXTRA_ID, -1); in onReceive() 64 Log.i(TAG, "received unexpected action: " + intent.getAction()); in onReceive()
|
/cts/tests/tests/voicesettings/service/src/android/voicesettings/service/ |
D | MainInteractionSession.java | 80 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, Utils.NUM_MINUTES_FOR_ZENMODE); in onShow() 88 intent = new Intent(ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE); in onShow() 89 intent.putExtra(EXTRA_DO_NOT_DISTURB_MODE_ENABLED, false); in onShow() 92 intent = new Intent(ACTION_VOICE_CONTROL_AIRPLANE_MODE); in onShow() 93 intent.putExtra(EXTRA_AIRPLANE_MODE_ENABLED, true); in onShow() 96 intent = new Intent(ACTION_VOICE_CONTROL_AIRPLANE_MODE); in onShow() 97 intent.putExtra(EXTRA_AIRPLANE_MODE_ENABLED, false); in onShow() [all …]
|
/cts/tests/tests/tv/src/android/tv/settings/cts/ |
D | SettingsLeanbackTest.java | 64 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/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/ |
D | ContentTest.java | 17 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/tests/tests/assist/service/src/android/voiceinteraction/service/ |
D | DelayedAssistantActivity.java | 32 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/tests/tests/alarmclock/src/android/alarmclock/cts/ |
D | AlarmClockTestBase.java | 74 Intent intent; in isIntentAupported() local 77 intent = new Intent(AlarmClock.ACTION_DISMISS_ALARM); in isIntentAupported() 82 intent = new Intent(AlarmClock.ACTION_SET_ALARM); in isIntentAupported() 86 intent = new Intent(AlarmClock.ACTION_SNOOZE_ALARM); in isIntentAupported() 95 if (manager.resolveActivity(intent, 0) == null) { in isIntentAupported() 96 Log.i(TAG, "No Voice Activity found for the intent: " + intent.getAction()); in isIntentAupported() 123 Intent intent = new Intent(); in startTestActivity() local 124 intent.setAction("android.intent.action.TEST_START_ACTIVITY_" + testCaseType.toString()); in startTestActivity() 125 intent.setComponent(new ComponentName(getInstrumentation().getContext(), in startTestActivity() 127 setActivityIntent(intent); in startTestActivity() [all …]
|
/cts/tests/tests/admin/src/android/admin/cts/ |
D | DeviceAdminReceiverTest.java | 88 public void onPasswordChanged(Context context, Intent intent) { in onPasswordChanged() argument 89 super.onPasswordChanged(context, intent); in onPasswordChanged() 94 public void onPasswordFailed(Context context, Intent intent) { in onPasswordFailed() argument 95 super.onPasswordFailed(context, intent); in onPasswordFailed() 100 public void onPasswordSucceeded(Context context, Intent intent) { in onPasswordSucceeded() argument 101 super.onPasswordSucceeded(context, intent); in onPasswordSucceeded() 106 public void onEnabled(Context context, Intent intent) { in onEnabled() argument 107 super.onEnabled(context, intent); in onEnabled() 112 public CharSequence onDisableRequested(Context context, Intent intent) { in onDisableRequested() argument 118 public void onDisabled(Context context, Intent intent) { in onDisabled() argument [all …]
|
/cts/hostsidetests/devicepolicy/app/WifiConfigCreator/src/com/android/cts/deviceowner/wificonfigcreator/ |
D | WifiConfigCreatorActivity.java | 46 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/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/ |
D | CertInstallerActivity.java | 71 Intent intent = getIntent(); in onCreate() local 72 if (intent == null) { in onCreate() 77 String action = intent.getAction(); in onCreate() 85 certBuffer = intent.getByteArrayExtra(EXTRA_CERT_DATA); in onCreate() 103 certBuffer = intent.getByteArrayExtra(EXTRA_CERT_DATA); in onCreate() 115 certBuffer = intent.getByteArrayExtra(EXTRA_CERT_DATA); in onCreate() 122 String alias = intent.getStringExtra(EXTRA_KEY_ALIAS); in onCreate() 123 String key = intent.getStringExtra(EXTRA_KEY_DATA); in onCreate() 124 String cert = intent.getStringExtra(EXTRA_CERT_DATA); in onCreate() 151 Intent intent = new Intent(); in sendResult() local [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | QuickContactBadgeTest.java | 44 public void startActivity(Intent intent) { in testPrioritizedMimetype() 45 testCallback(intent); in testPrioritizedMimetype() 49 public void startActivityAsUser(Intent intent, UserHandle user) { in testPrioritizedMimetype() 50 testCallback(intent); in testPrioritizedMimetype() 54 public void startActivityAsUser(Intent intent, Bundle options, UserHandle user) { in testPrioritizedMimetype() 55 testCallback(intent); in testPrioritizedMimetype() 58 private void testCallback(Intent intent) { in testPrioritizedMimetype() 59 assertEquals(plainMimeType, intent.getStringExtra( in testPrioritizedMimetype()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/ |
D | BleAdvertiserHardwareScanFilterActivity.java | 48 Intent intent = new Intent(BleAdvertiserHardwareScanFilterActivity.this, in onCreate() 50 intent.putExtra(BleAdvertiserService.EXTRA_COMMAND, in onCreate() 52 startService(intent); in onCreate() 66 Intent intent = new Intent(BleAdvertiserHardwareScanFilterActivity.this, in onCreate() 68 intent.putExtra(BleAdvertiserService.EXTRA_COMMAND, in onCreate() 70 startService(intent); in onCreate() 115 Intent intent = new Intent(BleAdvertiserHardwareScanFilterActivity.this, in stopAdvertising() local 117 intent.putExtra(BleAdvertiserService.EXTRA_COMMAND, in stopAdvertising() 119 intent.putExtra(BleAdvertiserService.EXTRA_COMMAND, in stopAdvertising() 121 startService(intent); in stopAdvertising() [all …]
|