From 91fb7aabc908a17000c1c0241c371c4099262861 Mon Sep 17 00:00:00 2001 From: Guang Zhu Date: Thu, 23 Aug 2012 16:09:04 -0700 Subject: 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 --- bugmailer/src/com/android/commands/sendbug/SendBug.java | 3 +-- 1 file changed, 1 insertion(+), 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(); -- cgit v1.2.3