Home | History | Annotate | Download | only in shell

Lines Matching defs:intent

29 import android.content.Intent;
45 * {@link Intent#ACTION_SEND}.
52 private static final String EXTRA_BUGREPORT = "android.intent.extra.BUGREPORT";
53 private static final String EXTRA_SCREENSHOT = "android.intent.extra.SCREENSHOT";
67 public void onReceive(Context context, Intent intent) {
68 final File bugreportFile = getFileExtra(intent, EXTRA_BUGREPORT);
69 final File screenshotFile = getFileExtra(intent, EXTRA_SCREENSHOT);
76 Intent sendIntent = buildSendIntent(context, bugreportUri, screenshotUri);
77 Intent notifIntent;
85 notifIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
110 private static Intent buildWarningIntent(Context context, Intent sendIntent) {
111 final Intent intent = new Intent(context, BugreportWarningActivity.class);
112 intent.putExtra(Intent.EXTRA_INTENT, sendIntent);
113 return intent;
117 * Build {@link Intent} that can be used to share the given bugreport.
119 private static Intent buildSendIntent(Context context, Uri bugreportUri, Uri screenshotUri) {
120 final Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE);
121 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
122 intent.addCategory(Intent.CATEGORY_DEFAULT);
123 intent.setType("application/vnd.android.bugreport");
125 intent.putExtra(Intent.EXTRA_SUBJECT, bugreportUri.getLastPathSegment());
126 intent.putExtra(Intent.EXTRA_TEXT, SystemProperties.get("ro.build.description"));
129 intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments);
133 intent.putExtra(Intent.EXTRA_EMAIL, new String[] { sendToAccount.name });
136 return intent;
173 private static File getFileExtra(Intent intent, String key) {
174 final String path = intent.getStringExtra(key);