/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
BroadcastTestBase.java | 22 import android.content.Intent; 73 Intent intent = new Intent(intentStr); local 76 if (manager.resolveActivity(intent, 0) == null) { 77 Log.i(TAG, "No Activity found for the intent: " + intentStr); 84 Intent intent = new Intent(); local 85 intent.setAction("android.intent.action.TEST_START_ACTIVITY_" + intentSuffix) [all...] |
BroadcastTestStartActivity.java | 20 import android.content.Intent; 41 Intent intent = new Intent(); local 43 intent.putExtra(BroadcastUtils.TESTCASE_TYPE, testCaseType); 44 intent.setAction("android.intent.action.VIMAIN_" + testCaseType); 45 intent.setComponent(new ComponentName(pkg, cls)); 46 startActivity(intent);
|
/cts/hostsidetests/appsecurity/test-apps/OrderedActivityApp/src/android/appsecurity/cts/orderedactivity/ |
PackageResolutionTest.java | 22 import android.content.Intent; 41 final Intent intent = new Intent("android.cts.intent.action.ORDERED"); local 42 intent.setData(Uri.parse("https://www.google.com/cts/packageresolution")); 43 final List<ResolveInfo> resolve = pm.queryIntentActivities(intent, 0 /*flags*/); 61 final Intent intent = new Intent("android.cts.intent.action.ORDERED") local 81 final Intent intent = new Intent("android.cts.intent.action.ORDERED"); local [all...] |
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/ |
IntentSenderActivity.java | 17 package com.android.cts.intent.sender; 23 import android.content.Intent; 43 public final Intent data; 45 public Result(int resultCode, Intent data) { 58 protected void onActivityResult(int requestCode, int resultCode, Intent data) { 68 public Intent getResult(Intent intent) throws Exception { 69 Log.d(TAG, "Sending intent " + intent); [all...] |
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
SetPolicyActivity.java | 21 import android.content.Intent; 50 // Overriding this method in case another intent is sent to this activity before finish() 52 public void onNewIntent(Intent intent) { 53 super.onNewIntent(intent); 54 handleIntent(intent); 65 private void handleIntent(Intent intent) { 68 String command = intent.getStringExtra(EXTRA_COMMAND); 72 String restrictionKey = intent.getStringExtra(EXTRA_RESTRICTION_KEY) [all...] |
SanityTest.java | 23 import android.content.Intent; 62 Intent intent = new Intent(); local 63 intent.setComponent(SIMPLE_APP_ACTIVITY); 65 intent.putExtra("finish", true); 66 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 67 mContext.startActivity(intent); 68 Intent receivedBroadcast = receiver.awaitForBroadcast() [all...] |
/developers/samples/android/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/ |
SendMessageActivity.java | 20 import android.content.Intent; 60 // Handle the share Intent. 78 protected void onActivityResult(int requestCode, int resultCode, Intent data) { 97 * Handles the passed {@link Intent}. This method can only handle intents for sharing a plain 100 * @param intent The {@link Intent}. 101 * @return true if the {@code intent} is handled properly. 103 private boolean handleIntent(Intent intent) { 104 if (Intent.ACTION_SEND.equals(intent.getAction() 136 Intent intent = new Intent(this, SelectContactActivity.class); local [all...] |
/development/samples/AppNavigation/src/com/example/android/appnavigation/app/ |
AppNavHomeActivity.java | 20 import android.content.Intent; 47 startActivity(info.intent); 51 Intent intent = new Intent(Intent.ACTION_MAIN, null); local 52 intent.setPackage(getPackageName()); 53 intent.addCategory(Intent.CATEGORY_SAMPLE_CODE); 56 List<ResolveInfo> infos = pm.queryIntentActivities(intent, 0) 78 Intent intent; field in class:AppNavHomeActivity.SampleInfo [all...] |
/external/sl4a/ScriptingLayerForAndroid/src/com/googlecode/android_scripting/service/ |
ScriptingLayerService.java | 23 import android.content.Intent; 86 public IBinder onBind(Intent intent) { 121 Intent notificationIntent = new Intent(this, ScriptingLayerService.class); 163 private void startAction(Intent intent, int flags, int startId) { 164 if (intent == null || intent.getAction() == null) { 171 Log.d(String.format("Received intent: %s", intent.toUri(0))) [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
ByodFlowTestHelper.java | 5 import android.content.Intent; 22 public void sendResultToPrimary(Intent result) { 23 final Intent intent = new Intent(ByodFlowTestActivity.ACTION_TEST_RESULT); local 24 intent.putExtra(ByodFlowTestActivity.EXTRA_RESULT, result); 25 startActivityInPrimary(intent); 28 public void startActivityInPrimary(Intent intent) { 30 // profile can respond (via cross-profile intent filter [all...] |
PolicyTransparencyTestListActivity.java | 19 import android.content.Intent; 54 * <li>An intent to start {@link PolicyTransparencyTestActivity} 59 private static final Pair<Intent, Integer>[] POLICIES; 95 final Intent intent = external variable declarations 96 new Intent(PolicyTransparencyTestActivity.ACTION_SHOW_POLICY_TRANSPARENCY_TEST) 100 POLICIES[i] = Pair.create(intent, policyLabels[i]); 147 final Intent intent = UserRestrictions.getUserRestrictionTestIntent(this, restriction); local 153 intent.putExtra(PolicyTransparencyTestActivity.EXTRA_TEST_ID, testId) 161 final Intent intent = policy.first; local 215 final Intent intent = new Intent(SetSupportMessageActivity.ACTION_SET_SUPPORT_MSG); local 220 final Intent intent = new Intent(SetSupportMessageActivity.ACTION_SET_SUPPORT_MSG); local 235 final Intent intent = new Intent(CommandReceiverActivity.ACTION_EXECUTE_COMMAND); local [all...] |
/cts/apps/NotificationBot/src/com/android/cts/robot/ |
NotificationBot.java | 27 import android.content.Intent; 61 public void onReceive(Context context, Intent intent) { 62 Log.i(TAG, "received intent: " + intent); 63 if (ACTION_POST.equals(intent.getAction())) { 65 if (!intent.hasExtra(EXTRA_NOTIFICATION) || !intent.hasExtra(EXTRA_ID)) { 69 int id = intent.getIntExtra(EXTRA_ID, -1); 71 Notification n = (Notification) intent.getParcelableExtra(EXTRA_NOTIFICATION) [all...] |
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
BroadcastTestStartActivity.java | 20 import android.content.Intent; 41 Intent intent = new Intent(); local 43 intent.putExtra(BroadcastUtils.TESTCASE_TYPE, testCaseType); 44 intent.setAction("android.intent.action.VIMAIN_" + testCaseType); 45 intent.setComponent(new ComponentName(pkg, cls)); 46 startActivity(intent);
|
/cts/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/ |
EphemeralService.java | 20 import android.content.Intent; 39 public IBinder onBind(Intent intent) { 44 .setIntent(intent) 52 public int onStartCommand(Intent intent, int flags, int startId) { 57 .setIntent(intent) 61 return super.onStartCommand(intent, flags, startId);
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/provisioning/ |
ManagedProfileProvisioningTest.java | 22 import android.content.Intent; 32 Intent intent = new Intent(ACTION_PROVISION_MANAGED_PROFILE) local 41 assertTrue(provisioningManager.startProvisioningAndWait(intent)); 52 private boolean isExtraUserPresent(Intent intent) { 53 return intent != null && intent.getExtras().containsKey(Intent.EXTRA_USER) [all...] |
/cts/hostsidetests/devicepolicy/app/NotificationSender/src/com/android/cts/managedprofiletests/notificationsender/ |
SendNotification.java | 24 import android.content.Intent; 44 Intent intent = getIntent(); local 45 if (intent != null && "POST_NOTIFICATION".equals(intent.getAction())) { 48 } else if (intent != null && "CANCEL_NOTIFICATION".equals(intent.getAction())) {
|
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/ |
BatteryStatsAlarmTest.java | 24 import android.content.Intent; 51 final Intent intent = new Intent("com.android.server.cts.device.batterystats.ALARM"); local 52 final IntentFilter inf = new IntentFilter(intent.getAction()); 58 public void onReceive(Context context, Intent intent) { 59 Log.i(TAG, "Received: " + intent); 67 PendingIntent.getBroadcast(context, i, intent, 0));
|
/cts/tests/JobSchedulerSharedUid/JobSharedUidTestApp/src/android/jobscheduler/cts/jobtestapp/ |
TestJobSchedulerReceiver.java | 24 import android.content.Intent; 42 public void onReceive(Context context, Intent intent) { 45 switch (intent.getAction()) { 51 final int jobId = intent.getIntExtra(EXTRA_JOB_ID_KEY, hashCode()); 52 final boolean allowInIdle = intent.getBooleanExtra(EXTRA_ALLOW_IN_IDLE, false); 65 Log.e(TAG, "Unknown action " + intent.getAction());
|
/cts/tests/app/src/android/app/cts/ |
BaseProcessInstrumentation.java | 24 import android.content.Intent; 52 Intent intent = new Intent(Intent.ACTION_MAIN); local 53 intent.setClassName(ActivityManagerTest.SIMPLE_PACKAGE_NAME, mReceiverClass); 54 intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND); 55 //Log.i("xxx", "Instrumentation sending broadcast: " + intent); 56 getContext().sendOrderedBroadcast(intent, null, new BroadcastReceiver() [all...] |
SearchManagerTest.java | 24 import android.content.Intent; 30 Intent intent = new Intent(); local 31 intent.setAction(action); 32 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 33 intent.setClass(getInstrumentation().getTargetContext(), SearchManagerStubActivity.class); 34 getInstrumentation().getTargetContext().startActivity(intent);
|
/cts/tests/tests/batterysaving/apps/app_target_api_current/src/android/os/cts/batterysaving/app/ |
TestService.java | 25 import android.content.Intent; 34 public static final AtomicReference<Intent> LastStartIntent = new AtomicReference(); 41 public int onStartCommand(Intent intent, int flags, int startId) { 43 Log.d(TAG, "TestService.TestService: intent=" + intent); 45 if (intent.getBooleanExtra(KEY_REQUEST_FOREGROUND, false)) { 58 LastStartIntent.set(intent); 64 public IBinder onBind(Intent intent) { [all...] |
/developers/build/prebuilts/gradle/BasicContactables/Application/src/main/java/com/example/android/basiccontactables/ |
MainActivity.java | 21 import android.content.Intent; 48 protected void onNewIntent(Intent intent) { 49 handleIntent(intent); 53 * Assuming this activity was started with a new intent, process the incoming information and 55 * @param intent 57 private void handleIntent(Intent intent) { 58 // Special processing of the incoming intent only occurs if the if the action specified 59 // by the intent is ACTION_SEARCH [all...] |
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/util/ |
SchedulerHelper.java | 21 import android.content.Intent; 52 Intent intent = new Intent(context, MockIncomingMessageReceiver.class); local 53 intent.setAction(Constants.ACTION_RECEIVE_MESSAGE); 54 intent.putExtra(Constants.EXTRA_CHAT, chat.getId()); 55 intent.putExtra(Constants.EXTRA_MESSAGE, message.getId()); 57 return PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
|
/developers/samples/android/content/contacts/BasicContactables/Application/src/main/java/com/example/android/basiccontactables/ |
MainActivity.java | 21 import android.content.Intent; 48 protected void onNewIntent(Intent intent) { 49 handleIntent(intent); 53 * Assuming this activity was started with a new intent, process the incoming information and 55 * @param intent 57 private void handleIntent(Intent intent) { 58 // Special processing of the incoming intent only occurs if the if the action specified 59 // by the intent is ACTION_SEARCH [all...] |
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/util/ |
SchedulerHelper.java | 21 import android.content.Intent; 52 Intent intent = new Intent(context, MockIncomingMessageReceiver.class); local 53 intent.setAction(Constants.ACTION_RECEIVE_MESSAGE); 54 intent.putExtra(Constants.EXTRA_CHAT, chat.getId()); 55 intent.putExtra(Constants.EXTRA_MESSAGE, message.getId()); 57 return PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
|