Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6a5ad6a authored by Lyn's avatar Lyn
Browse files

Replace "System UI" app name with "Android System"

Bug: 342555873
Test: manual
Flag: com.android.systemui.notification_avalanche_throttle_hun
Change-Id: Ie2e0fb79edd75fb0e92e957e33a1d5e643616d26
parent a8fdd28e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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