diff options
author | Roman Birg <roman@cyngn.com> | 2014-08-15 11:35:13 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-26 21:55:38 -0700 |
commit | bd1819d80bf508d95248ad4146b5c63ecb3a4a1f (patch) | |
tree | 5e894646bb601e3916e9cce38288c61a0a43550a /packages/Shell/src | |
parent | a9ef5111dd2b17067b69af9dd30ee78a22ae4c23 (diff) | |
download | frameworks_base-bd1819d80bf508d95248ad4146b5c63ecb3a4a1f.zip frameworks_base-bd1819d80bf508d95248ad4146b5c63ecb3a4a1f.tar.gz frameworks_base-bd1819d80bf508d95248ad4146b5c63ecb3a4a1f.tar.bz2 |
frameworks: add ongoing notification while collecting bug report
Change-Id: I644da7046b3cbbd0ec601f0e35dfbad6adf4dcf5
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/Shell/src')
-rw-r--r-- | packages/Shell/src/com/android/shell/BugreportReceiver.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportReceiver.java b/packages/Shell/src/com/android/shell/BugreportReceiver.java index d83b516..6e39111 100644 --- a/packages/Shell/src/com/android/shell/BugreportReceiver.java +++ b/packages/Shell/src/com/android/shell/BugreportReceiver.java @@ -65,6 +65,8 @@ public class BugreportReceiver extends BroadcastReceiver { private static final String EXTRA_BUGREPORT = "android.intent.extra.BUGREPORT"; private static final String EXTRA_SCREENSHOT = "android.intent.extra.SCREENSHOT"; + public static final String ACTION_BUGREPORT_STARTED = "android.intent.action.BUGREPORT_STARTED"; + /** * Always keep the newest 8 bugreport files; 4 reports and 4 screenshots are * roughly 17MB of disk space. @@ -79,6 +81,19 @@ public class BugreportReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { final Configuration conf = context.getResources().getConfiguration(); + if (ACTION_BUGREPORT_STARTED.equals(intent.getAction())) { + Notification.Builder builder = new Notification.Builder(context) + .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb) + .setOngoing(true) + .setProgress(0, 0, true) + .setContentTitle(context + .getString(R.string.notification_bug_report_active_title)) + .setContentText(context + .getString(R.string.notification_bug_report_active_text)); + NotificationManager.from(context).notify(TAG, 0, builder.build()); + return; + } + final File bugreportFile = getFileExtra(intent, EXTRA_BUGREPORT); final File screenshotFile = getFileExtra(intent, EXTRA_SCREENSHOT); |