summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-07-01 23:20:39 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-07-01 23:20:39 +0000
commit1b03121acd1bfe963dbf0744f85b00e3137349e7 (patch)
tree3b5daf643642b4a0f92c4fe00da6177d6e420e4b
parentc7d5e7fed47e9df7470c604a56d4b6592e1a25f9 (diff)
parentc6a5ad6a0a8c91a1df3745b8b1c33a788b794e91 (diff)
Merge "Replace "System UI" app name with "Android System"" into main
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt
index 48c89f8fa436..dac641f4cb23 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt
@@ -32,6 +32,7 @@ import android.content.pm.PackageManager
import android.content.pm.PackageManager.PERMISSION_GRANTED
import android.database.ContentObserver
import android.hardware.display.AmbientDisplayConfiguration
+import android.os.Bundle
import android.os.Handler
import android.os.PowerManager
import android.os.SystemProperties
@@ -368,6 +369,11 @@ class AvalancheSuppressor(
PendingIntent.FLAG_IMMUTABLE
)
+ // Replace "System UI" app name with "Android System"
+ val bundle = Bundle()
+ bundle.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME,
+ context.getString(com.android.internal.R.string.android_system_label))
+
val builder =
Notification.Builder(context, NotificationChannels.ALERTS)
.setTicker(titleStr)
@@ -378,6 +384,7 @@ class AvalancheSuppressor(
.setAutoCancel(true)
.addAction(android.R.drawable.button_onoff_indicator_off, actionStr, pendingIntent)
.setContentIntent(pendingIntent)
+ .addExtras(bundle)
notificationManager.notify(SystemMessage.NOTE_ADAPTIVE_NOTIFICATIONS, builder.build())
hasSeenEdu = true