diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index daad866b92b83..5130073e09730 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -319,9 +319,9 @@ Sync - Sync + Can\'t sync - Too many %s deletes. + Attempted to delete too many %s. Tablet storage is full. Delete some files to free space. @@ -3007,8 +3007,7 @@ limit - Heap dump has been collected; - tap to share + Heap dump collected. Tap to share. Share heap dump? @@ -3574,7 +3573,7 @@ Disconnected from always-on VPN - Always-on VPN error + Couldn\'t connect to always-on VPN Change network or VPN settings @@ -3591,8 +3590,8 @@ - Car mode enabled - Tap to exit car mode. + Driving app is running + Tap to exit driving app. @@ -4901,4 +4900,9 @@ Do Not Disturb has changed Tap to check what\'s blocked. + + + System + + Settings diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 3af44c241cd20..53c2ceb160c29 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3300,4 +3300,7 @@ + + + diff --git a/packages/SystemUI/src/com/android/systemui/SystemUI.java b/packages/SystemUI/src/com/android/systemui/SystemUI.java index 6b30a89d51c01..30fbef6cbefb6 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUI.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUI.java @@ -51,10 +51,13 @@ public abstract class SystemUI implements SysUiServiceProvider { } } - public static void overrideNotificationAppName(Context context, Notification.Builder n) { + public static void overrideNotificationAppName(Context context, Notification.Builder n, + boolean system) { final Bundle extras = new Bundle(); - extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, - context.getString(com.android.internal.R.string.android_system_label)); + String appName = system + ? context.getString(com.android.internal.R.string.notification_app_name_system) + : context.getString(com.android.internal.R.string.notification_app_name_settings); + extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, appName); n.addExtras(extras); } diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java index 3a2b12f4da231..9a3a825b138cb 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java @@ -177,7 +177,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setContentText(mContext.getString(R.string.invalid_charger_text)) .setColor(mContext.getColor( com.android.internal.R.color.system_notification_accent_color)); - SystemUI.overrideNotificationAppName(mContext, nb); + SystemUI.overrideNotificationAppName(mContext, nb, false); final Notification n = nb.build(); mNoMan.cancelAsUser(TAG_BATTERY, SystemMessage.NOTE_POWER_LOW, UserHandle.ALL); mNoMan.notifyAsUser(TAG_BATTERY, SystemMessage.NOTE_BAD_CHARGER, n, UserHandle.ALL); @@ -222,7 +222,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { pendingBroadcast(ACTION_START_SAVER)); nb.setOnlyAlertOnce(!mPlaySound); mPlaySound = false; - SystemUI.overrideNotificationAppName(mContext, nb); + SystemUI.overrideNotificationAppName(mContext, nb, false); final Notification n = nb.build(); mNoMan.cancelAsUser(TAG_BATTERY, SystemMessage.NOTE_BAD_CHARGER, UserHandle.ALL); mNoMan.notifyAsUser(TAG_BATTERY, SystemMessage.NOTE_POWER_LOW, n, UserHandle.ALL); @@ -289,7 +289,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setContentIntent(pendingBroadcast(ACTION_CLICKED_TEMP_WARNING)) .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_TEMP_WARNING)) .setColor(Utils.getColorAttr(mContext, android.R.attr.colorError)); - SystemUI.overrideNotificationAppName(mContext, nb); + SystemUI.overrideNotificationAppName(mContext, nb, false); final Notification n = nb.build(); mNoMan.notifyAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP, n, UserHandle.ALL); } @@ -339,7 +339,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setDeleteIntent( pendingBroadcast(ACTION_DISMISSED_THERMAL_SHUTDOWN_WARNING)) .setColor(Utils.getColorAttr(mContext, android.R.attr.colorError)); - SystemUI.overrideNotificationAppName(mContext, nb); + SystemUI.overrideNotificationAppName(mContext, nb, false); final Notification n = nb.build(); mNoMan.notifyAsUser( TAG_TEMPERATURE, SystemMessage.NOTE_THERMAL_SHUTDOWN, n, UserHandle.ALL); diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index 9793b1fcabe4d..7db2a505b861d 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -195,7 +195,7 @@ class SaveImageInBackgroundTask extends AsyncTask { .setShowWhen(true) .setColor(r.getColor( com.android.internal.R.color.system_notification_accent_color)); - SystemUI.overrideNotificationAppName(context, mPublicNotificationBuilder); + SystemUI.overrideNotificationAppName(context, mPublicNotificationBuilder, true); mNotificationBuilder = new Notification.Builder(context, NotificationChannels.SCREENSHOTS_HEADSUP) @@ -210,7 +210,7 @@ class SaveImageInBackgroundTask extends AsyncTask { .setStyle(mNotificationStyle) .setPublicVersion(mPublicNotificationBuilder.build()); mNotificationBuilder.setFlag(Notification.FLAG_NO_CLEAR, true); - SystemUI.overrideNotificationAppName(context, mNotificationBuilder); + SystemUI.overrideNotificationAppName(context, mNotificationBuilder, true); mNotificationManager.notify(SystemMessage.NOTE_GLOBAL_SCREENSHOT, mNotificationBuilder.build()); @@ -889,7 +889,7 @@ class GlobalScreenshot { b.setContentIntent(pendingIntent); } - SystemUI.overrideNotificationAppName(context, b); + SystemUI.overrideNotificationAppName(context, b, true); Notification n = new Notification.BigTextStyle(b) .bigText(errorMsg) diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index c3a53dedd0cf6..7ffca173be86f 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -219,7 +219,7 @@ public class StorageNotification extends SystemUI { .setCategory(Notification.CATEGORY_SYSTEM) .setDeleteIntent(buildSnoozeIntent(fsUuid)) .extend(new Notification.TvExtender()); - SystemUI.overrideNotificationAppName(mContext, builder); + SystemUI.overrideNotificationAppName(mContext, builder, false); mNotificationManager.notifyAsUser(fsUuid, SystemMessage.NOTE_STORAGE_PRIVATE, builder.build(), UserHandle.ALL); @@ -247,7 +247,7 @@ public class StorageNotification extends SystemUI { .setLocalOnly(true) .setCategory(Notification.CATEGORY_ERROR) .extend(new Notification.TvExtender()); - SystemUI.overrideNotificationAppName(mContext, builder); + SystemUI.overrideNotificationAppName(mContext, builder, false); mNotificationManager.notifyAsUser(disk.getId(), SystemMessage.NOTE_STORAGE_DISK, builder.build(), UserHandle.ALL); @@ -498,7 +498,7 @@ public class StorageNotification extends SystemUI { .setCategory(Notification.CATEGORY_PROGRESS) .setProgress(100, status, false) .setOngoing(true); - SystemUI.overrideNotificationAppName(mContext, builder); + SystemUI.overrideNotificationAppName(mContext, builder, false); mNotificationManager.notifyAsUser(move.packageName, SystemMessage.NOTE_STORAGE_MOVE, builder.build(), UserHandle.ALL); @@ -548,7 +548,7 @@ public class StorageNotification extends SystemUI { .setLocalOnly(true) .setCategory(Notification.CATEGORY_SYSTEM) .setAutoCancel(true); - SystemUI.overrideNotificationAppName(mContext, builder); + SystemUI.overrideNotificationAppName(mContext, builder, false); mNotificationManager.notifyAsUser(move.packageName, SystemMessage.NOTE_STORAGE_MOVE, builder.build(), UserHandle.ALL); @@ -582,7 +582,7 @@ public class StorageNotification extends SystemUI { .setVisibility(Notification.VISIBILITY_PUBLIC) .setLocalOnly(true) .extend(new Notification.TvExtender()); - overrideNotificationAppName(mContext, builder); + overrideNotificationAppName(mContext, builder, false); return builder; }