summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2012-08-23 16:09:04 -0700
committerThe Android Automerger <android-build@android.com>2012-08-23 17:55:53 -0700
commit91fb7aabc908a17000c1c0241c371c4099262861 (patch)
treef91a2bebfd2b4cc6875cf7f932222833511a5df8
parent3df3667fe03c5f21d3737c1a50424ef446b7830c (diff)
downloadextras-91fb7aabc908a17000c1c0241c371c4099262861.tar.gz
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
-rw-r--r--bugmailer/src/com/android/commands/sendbug/SendBug.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/bugmailer/src/com/android/commands/sendbug/SendBug.java b/bugmailer/src/com/android/commands/sendbug/SendBug.java
index 84a488df..9b693a06 100644
--- a/bugmailer/src/com/android/commands/sendbug/SendBug.java
+++ b/bugmailer/src/com/android/commands/sendbug/SendBug.java
@@ -66,7 +66,6 @@ public class SendBug {
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 @@ public class SendBug {
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();