/developers/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/provider/ |
ComplicationToggleReceiver.java | 22 import android.content.Intent; 44 public void onReceive(Context context, Intent intent) { 45 Bundle extras = intent.getExtras(); 68 * Returns a pending intent, suitable for use as a tap intent, that causes a complication to be 73 Intent intent = new Intent(context, ComplicationToggleReceiver.class); local 74 intent.putExtra(EXTRA_PROVIDER_COMPONENT, provider) [all...] |
/developers/samples/android/wearable/wear/XYZTouristAttractions/Application/src/main/java/com/example/android/xyztouristattractions/ui/ |
DetailActivity.java | 22 import android.content.Intent; 42 Intent intent = getLaunchIntent(activity, attraction); local 46 ActivityCompat.startActivity(activity, intent, options.toBundle()); 48 activity.startActivity(intent); 52 public static Intent getLaunchIntent(Context context, String attraction) { 53 Intent intent = new Intent(context, DetailActivity.class); local 54 intent.putExtra(EXTRA_ATTRACTION, attraction) [all...] |
/development/samples/browseable/MessagingService/src/com.example.android.messagingservice/ |
MessageReplyReceiver.java | 22 import android.content.Intent; 40 public void onReceive(Context context, Intent intent) { 41 if (MessagingService.REPLY_ACTION.equals(intent.getAction())) { 42 int conversationId = intent.getIntExtra(MessagingService.CONVERSATION_ID, -1); 43 CharSequence reply = getMessageText(intent); 64 * Get the message text from the intent. 65 * Note that you should call {@code RemoteInput#getResultsFromIntent(intent)} to process 68 private CharSequence getMessageText(Intent intent) { [all...] |
/development/samples/browseable/XYZTouristAttractions/Application/src/com.example.android.xyztouristattractions/ui/ |
DetailActivity.java | 22 import android.content.Intent; 42 Intent intent = getLaunchIntent(activity, attraction); local 46 ActivityCompat.startActivity(activity, intent, options.toBundle()); 48 activity.startActivity(intent); 52 public static Intent getLaunchIntent(Context context, String attraction) { 53 Intent intent = new Intent(context, DetailActivity.class); local 54 intent.putExtra(EXTRA_ATTRACTION, attraction) [all...] |
/frameworks/base/core/tests/coretests/src/android/app/activity/ |
LocalReceiver.java | 22 import android.content.Intent; 34 public void onReceive(Context context, Intent intent) { 36 if (BroadcastTest.BROADCAST_FAIL_REGISTER.equals(intent.getAction())) { 45 } else if (BroadcastTest.BROADCAST_FAIL_BIND.equals(intent.getAction())) { 55 context.bindService(new Intent(context, LocalService.class), sc, 0); 61 } else if (LaunchpadActivity.BROADCAST_REPEAT.equals(intent.getAction())) { 62 Intent newIntent = new Intent(intent); [all...] |
/frameworks/base/tests/utils/SleepUtils/WakeLoopService/src/android/test/wakeuploop/ |
WakeLoopService.java | 23 import android.content.Intent; 54 public IBinder onBind(Intent intent) { 55 // no binding, just start via intent 60 public int onStartCommand(Intent intent, int flags, int startId) { 61 // get wakeup interval from intent 62 long wakeupInterval = intent.getLongExtra(WAKEUP_INTERNAL, 0); 63 long maxLoop = intent.getLongExtra(MAX_LOOP, 0); 78 Intent wakupIntent = new Intent(WakeUpCall.WAKEUP_CALL 94 Intent intent = new Intent(WakeUpCall.WAKEUP_CALL) local [all...] |
/frameworks/support/design/tests/src/android/support/design/widget/ |
BottomSheetBehaviorInitialStateTest.java | 23 import android.content.Intent; 44 Intent intent = new Intent(context, BottomSheetBehaviorActivity.class); local 45 intent.putExtra(BottomSheetBehaviorActivity.EXTRA_INITIAL_STATE, 47 mActivityTestRule.launchActivity(intent); 57 Intent intent = new Intent(context, BottomSheetBehaviorActivity.class); local 58 intent.putExtra(BottomSheetBehaviorActivity.EXTRA_INITIAL_STATE [all...] |
/packages/apps/Calendar/src/com/android/calendar/alerts/ |
SnoozeAlarmsService.java | 24 import android.content.Intent; 44 public IBinder onBind(Intent intent) { 49 public void onHandleIntent(Intent intent) { 51 long eventId = intent.getLongExtra(AlertUtils.EVENT_ID_KEY, -1); 52 long eventStart = intent.getLongExtra(AlertUtils.EVENT_START_KEY, -1); 53 long eventEnd = intent.getLongExtra(AlertUtils.EVENT_END_KEY, -1); 57 int notificationId = intent.getIntExtra(AlertUtils.NOTIFICATION_ID_KEY,
|
/packages/apps/Car/Messenger/src/com/android/car/messenger/ |
MapMessage.java | 21 import android.content.Intent; 37 * Constructs Message from {@code intent} that was received from MAP service via 40 * @param intent Intent received from MAP service. 41 * @return Message constructed from extras in {@code intent}. 42 * @throws IllegalArgumentException If {@code intent} is missing any required fields. 44 public static MapMessage parseFrom(Intent intent) { 45 BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); 46 String handle = intent.getStringExtra(BluetoothMapClient.EXTRA_MESSAGE_HANDLE) [all...] |
/packages/apps/Contacts/src/com/android/contacts/util/ |
PhoneCapabilityTester.java | 21 import android.content.Intent; 45 * Tests whether the Intent has a receiver registered. This can be used to show/hide 48 public static boolean isIntentRegistered(Context context, Intent intent) { 50 final List<ResolveInfo> receiverList = packageManager.queryIntentActivities(intent, 86 final Intent intent = new Intent(Intent.ACTION_SENDTO, local 88 final List<ResolveInfo> resolveInfos = packageManager.queryIntentActivities(intent, 0) 102 final Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); local [all...] |
/packages/apps/Dialer/java/com/android/dialer/shortcuts/ |
ShortcutInfoFactory.java | 21 import android.content.Intent; 41 /** Key for the contact ID extra (a long) stored as part of the shortcut intent. */ 54 * DialerShortcut} objects. This primarily means setting the intent and adding the icon, which 63 Intent intent = new Intent(); local 64 intent.setClassName(context, "com.android.dialer.shortcuts.CallContactActivity"); 65 intent.setData(shortcut.getLookupUri()); 66 intent.setAction("com.android.dialer.shortcuts.CALL_CONTACT"); 67 intent.putExtra(EXTRA_CONTACT_ID, shortcut.getContactId()) [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/ |
WidgetClickHandler.java | 21 import android.content.Intent; 57 Intent intent; local 59 intent = new Intent(Intent.ACTION_VIEW, uri); 61 intent.putExtra(PhotoPage.KEY_TREAT_BACK_AS_UP, true); 66 intent = new Intent(this, GalleryActivity.class); 69 intent.setFlags [all...] |
/packages/apps/Settings/src/com/android/settings/ |
ManualDisplayActivity.java | 21 import android.content.Intent; 64 final Intent intent = new Intent(Intent.ACTION_VIEW); local 65 intent.setDataAndType(Uri.fromFile(file), "text/html"); 67 intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.settings_manual_activity_title)); 68 intent.addCategory(Intent.CATEGORY_DEFAULT) [all...] |
/packages/apps/Settings/src/com/android/settings/applications/ |
PhotosViewHolderController.java | 21 import android.content.Intent; 83 Intent intent = new Intent(); local 84 intent.setAction(android.content.Intent.ACTION_VIEW); 85 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); 86 intent.setType(IMAGE_MIME_TYPE); 87 intent.putExtra(Intent.EXTRA_FROM_STORAGE, true) [all...] |
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
BluetoothPairingDialog.java | 24 import android.content.Intent; 45 public void onReceive(Context context, Intent intent) { 46 String action = intent.getAction(); 48 int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, 55 BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); 66 Intent intent = getIntent(); local 67 mBluetoothPairingController = new BluetoothPairingController(intent, this);
|
/packages/apps/Settings/src/com/android/settings/password/ |
ChooseLockSettingsHelper.java | 24 import android.content.Intent; 69 * @see Activity#onActivityResult(int, int, android.content.Intent) 79 * @param returnCredentials if true, put credentials into intent. Note that if this is true, 82 * @see Activity#onActivityResult(int, int, android.content.Intent) 92 * @param returnCredentials if true, put credentials into intent. Note that if this is true, 96 * @see Activity#onActivityResult(int, int, android.content.Intent) 110 * @param returnCredentials if true, put credentials into intent. Note that if this is true, 116 * @see Activity#onActivityResult(int, int, android.content.Intent) 131 * @param returnCredentials if true, put credentials into intent. Note that if this is true, 138 * @see Activity#onActivityResult(int, int, android.content.Intent) 254 final Intent intent = new Intent(); local 273 copyOptionalExtras(mFragment.getActivity().getIntent(), intent); local 276 copyOptionalExtras(mActivity.getIntent(), intent); local 281 copyInternalExtras(mFragment.getActivity().getIntent(), intent); local 284 copyInternalExtras(mActivity.getIntent(), intent); local [all...] |
/packages/experimental/NotificationShowcase/src/com/android/example/notificationshowcase/ |
PhoneService.java | 23 import android.content.Intent; 47 public int onStartCommand(Intent intent, int flags, int startId) { 49 return super.onStartCommand(intent, flags, startId); 53 protected void onHandleIntent(Intent intent) { 54 Log.v(TAG, "clicked a thing! intent=" + intent.toString()); 55 int res = ACTION_ANSWER.equals(intent.getAction()) ? R.string.answered : R.string.ignored; 57 final int id = intent.getIntExtra(EXTRA_ID, -1) [all...] |
ProgressService.java | 23 import android.content.Intent; 70 public int onStartCommand(Intent intent, int flags, int startId) { 72 return super.onStartCommand(intent, flags, startId); 77 protected void onHandleIntent(Intent intent) { 78 final int id = intent.getIntExtra("id", 0); 79 final long when = intent.getLongExtra("when", 0L); 80 int progress = intent.getIntExtra("progress", 0); 85 Intent progressIntent = new Intent(context, ProgressService.class) [all...] |
/packages/services/Car/TrustAgent/src/com/android/car/trust/ |
MainActivity.java | 19 import android.content.Intent; 46 Intent intent = new Intent(MainActivity.this /* context */, 48 startActivity(intent); 55 Intent intent = new Intent(MainActivity.this /* context */, 57 startActivity(intent); 64 Intent intent = new Intent(MainActivity.this /* context */ [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/ |
BleAdvertiserPowerLevelActivity.java | 24 import android.content.Intent; 47 Intent intent = new Intent(BleAdvertiserPowerLevelActivity.this, 49 intent.putExtra(BleAdvertiserService.EXTRA_COMMAND, 51 startService(intent); 87 Intent intent = new Intent(BleAdvertiserPowerLevelActivity.this, local 89 intent.putExtra(BleAdvertiserService.EXTRA_COMMAND [all...] |
/cts/hostsidetests/devicepolicy/app/SimpleApp/src/com/android/cts/launcherapps/simpleapp/ |
SimpleReceiverStartService.java | 22 import android.content.Intent; 26 public void onReceive(Context context, Intent intent) { 27 Intent serviceIntent = intent.getParcelableExtra("service");
|
/cts/hostsidetests/services/activityandwindowmanager/activitymanager/app/src/android/server/cts/ |
LaunchBroadcastReceiver.java | 21 import android.content.Intent; 30 public void onReceive(Context context, Intent intent) { 32 ActivityLauncher.launchActivityFromExtras(context, intent.getExtras());
|
MoveTaskToBackActivity.java | 19 import android.content.Intent; 35 final Intent intent = getIntent(); local 36 mFinishPoint = intent.getExtras().getString("finish_point");
|
PipActivity.java | 19 import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK; 20 import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; 29 import android.content.Intent; 43 // Intent action that this activity dynamically registers to enter picture-in-picture 45 // Intent action that this activity dynamically registers to move itself to the back 47 // Intent action that this activity dynamically registers to expand itself. 51 // Intent action that this activity dynamically registers to set requested orientation. 55 // Intent action that will finish this activity 103 public void onReceive(Context context, Intent intent) { 304 final Intent intent = new Intent(caller, PipActivity.class); local 319 final Intent intent = new Intent(caller, PipActivity.class); local [all...] |
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
AccessibilitySettingsTest.java | 19 import android.content.Intent; 29 * This test case is responsible to verify that the intent for launching 37 Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS); local 38 List<ResolveInfo> resolvedActivities = packageManager.queryIntentActivities(intent, 42 String message = "Accessibility settings activity must be launched via Intent " +
|