summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
author Amith Yamasani <yamasani@google.com> 2017-05-30 12:35:45 -0700
committer Amith Yamasani <yamasani@google.com> 2017-05-30 20:04:32 +0000
commit1d6e1759d2337240627b9dd30d221390843cbb4d (patch)
treec128a2e885f9d3cbcd2cae49c184d42e8f17f608 /packages/Shell/src
parentd2638591d963ef45f8f90886252279c497d5d1af (diff)
Fix #62169466 bug report sharing options empty
Was caused by a new requirement to not offer to show non-exported intent handlers as options. For first time warning dialog, don't show a chooser activity. Change-Id: Ibada9a7a14b77ec0670bf35ba0944f369d42bf69 Fixes: 62169466 Test: manual Test: mmm -j32 frameworks/base/packages/Shell && adb install -r -g ${OUT}/data/app/ShellTests/ShellTests.apk && adb shell am instrument -e class com.android.shell.BugreportReceiverTest$1 -w com.android.shell.tests/android.support.test.runner.AndroidJUnitRunner
Diffstat (limited to 'packages/Shell/src')
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 1ddbcad8e844..348b02aeda4a 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -966,17 +966,24 @@ public class BugreportProgressService extends Service {
}
final Intent notifIntent;
+ boolean useChooser = true;
// Send through warning dialog by default
if (getWarningState(mContext, STATE_UNKNOWN) != STATE_HIDE) {
notifIntent = buildWarningIntent(mContext, sendIntent);
+ // No need to show a chooser in this case.
+ useChooser = false;
} else {
notifIntent = sendIntent;
}
notifIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Send the share intent...
- sendShareIntent(mContext, notifIntent);
+ if (useChooser) {
+ sendShareIntent(mContext, notifIntent);
+ } else {
+ mContext.startActivity(notifIntent);
+ }
// ... and stop watching this process.
stopProgress(id);