diff options
author | Guang Zhu <guangzhu@google.com> | 2012-08-23 16:09:04 -0700 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2012-08-23 16:09:04 -0700 |
commit | 46899d1b5d606e9349a40079b60034e3cf6eaafb (patch) | |
tree | f91a2bebfd2b4cc6875cf7f932222833511a5df8 | |
parent | 62716d5212c9f993a85654641b534f008e487bd9 (diff) | |
download | extras-46899d1b5d606e9349a40079b60034e3cf6eaafb.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.java | 3 |
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(); |