diff options
| author | 2016-04-18 16:15:00 -0700 | |
|---|---|---|
| committer | 2016-04-19 09:49:18 -0700 | |
| commit | 65a9c6760ef6cf1c8e1762a271aa43c626d27048 (patch) | |
| tree | 0efde356dc4b19d1175e5206498530995693368a /packages/Shell/src | |
| parent | 0529197e9df8837ac63b011937391ff29426e6b5 (diff) | |
Show "Android System" instead of "Shell" on notifications.
BUG: 26517701
Change-Id: If2543b8db0fdd913365df6f69cf26146d32d4b15
Diffstat (limited to 'packages/Shell/src')
| -rw-r--r-- | packages/Shell/src/com/android/shell/BugreportProgressService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index 346ae201cdb6..ec3999808c8c 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -62,6 +62,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.net.Uri; import android.os.AsyncTask; +import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; @@ -204,6 +205,8 @@ public class BugreportProgressService extends Service { */ private boolean mTakingScreenshot; + private static final Bundle sNotificationBundle = new Bundle(); + @Override public void onCreate() { mContext = getApplicationContext(); @@ -979,7 +982,13 @@ public class BugreportProgressService extends Service { } private static Notification.Builder newBaseNotification(Context context) { + if (sNotificationBundle.isEmpty()) { + // Rename notifcations from "Shell" to "Android System" + sNotificationBundle.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, + context.getString(com.android.internal.R.string.android_system_label)); + } return new Notification.Builder(context) + .addExtras(sNotificationBundle) .setCategory(Notification.CATEGORY_SYSTEM) .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb) .setLocalOnly(true) |