summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
authorBryce Lee <brycelee@google.com>2017-05-23 09:02:09 -0700
committerBryce Lee <brycelee@google.com>2017-05-23 09:02:09 -0700
commit6483b86a929f33ef34753cb4678f623c54ff483c (patch)
tree1b043e2ba2727c52df11ddf2f89a46cd58099e53 /packages/Shell/src
parentff389264d9abd3278247a93d1d518882407f9cfc (diff)
Add new task flag when starting chooser activity in bug report.
This flag is required whenever starting an activity from a non-activity context. Change-Id: Ia77e6e7801d712a20d407bc2ac92e543bc287010 Fixes: 62016780 Test: Click on generated bug report notification
Diffstat (limited to 'packages/Shell/src')
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 415bf9a0470b..05625c7d5a0c 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -981,6 +981,8 @@ public class BugreportProgressService extends Service {
// Since we may be launched behind lockscreen, make sure that ChooserActivity doesn't finish
// itself in onStop.
chooserIntent.putExtra(ChooserActivity.EXTRA_PRIVATE_RETAIN_IN_ON_STOP, true);
+ // Starting the activity from a service.
+ chooserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(chooserIntent);
}