Don't use intent chooser
Since it forces user to make selection, not offering an option to
remember the choice. Remove the new task flag, also adds an
explicit default category
Change-Id: I3834a8fa27782d14989e510c0756d36aaeeb2bab
diff --git a/bugmailer/src/com/android/commands/sendbug/SendBug.java b/bugmailer/src/com/android/commands/sendbug/SendBug.java
index 84a488d..9b693a0 100644
--- a/bugmailer/src/com/android/commands/sendbug/SendBug.java
+++ b/bugmailer/src/com/android/commands/sendbug/SendBug.java
@@ -66,7 +66,6 @@
final Uri screenshotUri = screenShot != null
? Uri.fromFile(screenShot) : null;
intent = getSendMailIntent(bugreportUri, screenshotUri);
- intent = Intent.createChooser(intent, "Send Bugreport via");
}
if (intent != null) {
final IActivityManager mAm = ActivityManagerNative.getDefault();
@@ -110,7 +109,7 @@
private Intent getSendMailIntent(Uri bugreportUri, Uri screenshotUri) {
final Account sendToAccount = findSendToAccount();
final Intent intent = new Intent(Intent.ACTION_SEND);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setType("application/octet-stream");
intent.putExtra(Intent.EXTRA_SUBJECT, bugreportUri.getLastPathSegment());
final StringBuilder sb = new StringBuilder();