Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,9 @@ public class PluginInstanceManager<T extends Plugin> { private static final String TAG = "PluginInstanceManager"; private static final String PLUGIN_PERMISSION = "com.android.systemui.permission.PLUGIN"; // must be one of the channels created in NotificationChannels.java private static final String NOTIFICATION_CHANNEL_ID = "ALR"; private final Context mContext; private final PluginListener<T> mListener; private final String mAction; Loading Loading @@ -312,7 +315,7 @@ public class PluginInstanceManager<T extends Plugin> { .setSmallIcon(icon) .setWhen(0) .setShowWhen(false) .setPriority(Notification.PRIORITY_MAX) .setChannel(NOTIFICATION_CHANNEL_ID) .setVisibility(Notification.VISIBILITY_PUBLIC) .setColor(mContext.getColor(color)); String label = cls; Loading packages/SystemUI/res/values/strings.xml +11 −0 Original line number Diff line number Diff line Loading @@ -1800,4 +1800,15 @@ <!-- SysUI Tuner: Switch to control if device gets unlocked [CHAR LIMIT=60] --> <string name="lockscreen_unlock">Prompt for password</string> <!-- Title for the notification channel containing important alerts like low battery. [CHAR LIMIT=NONE] --> <string name="notification_channel_alerts">Alerts</string> <!-- Title for the notification channel dedicated to screenshot progress. [CHAR LIMIT=NONE] --> <string name="notification_channel_screenshot">Screenshots</string> <!-- Title for the notification channel for urgent security issues. [CHAR LIMIT=NONE] --> <string name="notification_channel_security">Security</string> <!-- Title for the notification channel containing multi-user status information. [CHAR LIMIT=NONE] --> <string name="notification_channel_user_status">User status</string> <!-- Title for the notification channel for problems with storage (i.e. low disk). [CHAR LIMIT=NONE] --> <string name="notification_channel_storage">Storage</string> </resources> packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.systemui.statusbar.SystemBars; import com.android.systemui.statusbar.phone.PhoneStatusBar; import com.android.systemui.tuner.TunerService; import com.android.systemui.usb.StorageNotification; import com.android.systemui.util.NotificationChannels; import com.android.systemui.volume.VolumeUI; import java.util.HashMap; Loading @@ -66,6 +67,7 @@ public class SystemUIApplication extends Application implements SysUiServiceProv Dependency.class, FragmentService.class, TunerService.class, NotificationChannels.class, CommandQueue.CommandQueueStart.class, KeyguardViewMediator.class, Recents.class, Loading packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +4 −4 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.systemui.R; import com.android.systemui.SystemUI; import com.android.systemui.statusbar.phone.PhoneStatusBar; import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.systemui.util.NotificationChannels; import java.io.PrintWriter; import java.text.NumberFormat; Loading Loading @@ -151,8 +152,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setOngoing(true) .setContentTitle(mContext.getString(R.string.invalid_charger_title)) .setContentText(mContext.getString(R.string.invalid_charger_text)) .setPriority(Notification.PRIORITY_MAX) .setVisibility(Notification.VISIBILITY_PUBLIC) .setChannel(NotificationChannels.ALERTS) .setColor(mContext.getColor( com.android.internal.R.color.system_notification_accent_color)); SystemUI.overrideNotificationAppName(mContext, nb); Loading @@ -173,7 +173,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setContentText(mContext.getString(textRes, percentage)) .setOnlyAlertOnce(true) .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING)) .setPriority(Notification.PRIORITY_MAX) .setChannel(NotificationChannels.ALERTS) .setVisibility(Notification.VISIBILITY_PUBLIC) .setColor(mContext.getColor( com.android.internal.R.color.battery_saver_mode_color)); Loading Loading @@ -241,7 +241,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setShowWhen(false) .setContentTitle(mContext.getString(R.string.high_temp_title)) .setContentText(mContext.getString(R.string.high_temp_notif_message)) .setPriority(Notification.PRIORITY_HIGH) .setChannel(NotificationChannels.ALERTS) .setVisibility(Notification.VISIBILITY_PUBLIC) .setContentIntent(pendingBroadcast(ACTION_CLICKED_TEMP_WARNING)) .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_TEMP_WARNING)) Loading packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +5 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.widget.ImageView; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.systemui.R; import com.android.systemui.SystemUI; import com.android.systemui.util.NotificationChannels; import java.io.File; import java.io.FileOutputStream; Loading Loading @@ -178,6 +179,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { // The public notification will show similar info but with the actual screenshot omitted mPublicNotificationBuilder = new Notification.Builder(context) .setChannel(NotificationChannels.SCREENSHOTS) .setContentTitle(r.getString(R.string.screenshot_saving_title)) .setContentText(r.getString(R.string.screenshot_saving_text)) .setSmallIcon(R.drawable.stat_notify_image) Loading @@ -189,6 +191,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { SystemUI.overrideNotificationAppName(context, mPublicNotificationBuilder); mNotificationBuilder = new Notification.Builder(context) .setChannel(NotificationChannels.SCREENSHOTS) .setTicker(r.getString(R.string.screenshot_saving_ticker) + (mTickerAddSpace ? " " : "")) .setContentTitle(r.getString(R.string.screenshot_saving_title)) Loading Loading @@ -332,6 +335,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { // Update the text and the icon for the existing notification mPublicNotificationBuilder .setChannel(NotificationChannels.SCREENSHOTS) .setContentTitle(r.getString(R.string.screenshot_saved_title)) .setContentText(r.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0)) Loading @@ -340,6 +344,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { .setColor(context.getColor( com.android.internal.R.color.system_notification_accent_color)); mNotificationBuilder .setChannel(NotificationChannels.SCREENSHOTS) .setContentTitle(r.getString(R.string.screenshot_saved_title)) .setContentText(r.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0)) Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,9 @@ public class PluginInstanceManager<T extends Plugin> { private static final String TAG = "PluginInstanceManager"; private static final String PLUGIN_PERMISSION = "com.android.systemui.permission.PLUGIN"; // must be one of the channels created in NotificationChannels.java private static final String NOTIFICATION_CHANNEL_ID = "ALR"; private final Context mContext; private final PluginListener<T> mListener; private final String mAction; Loading Loading @@ -312,7 +315,7 @@ public class PluginInstanceManager<T extends Plugin> { .setSmallIcon(icon) .setWhen(0) .setShowWhen(false) .setPriority(Notification.PRIORITY_MAX) .setChannel(NOTIFICATION_CHANNEL_ID) .setVisibility(Notification.VISIBILITY_PUBLIC) .setColor(mContext.getColor(color)); String label = cls; Loading
packages/SystemUI/res/values/strings.xml +11 −0 Original line number Diff line number Diff line Loading @@ -1800,4 +1800,15 @@ <!-- SysUI Tuner: Switch to control if device gets unlocked [CHAR LIMIT=60] --> <string name="lockscreen_unlock">Prompt for password</string> <!-- Title for the notification channel containing important alerts like low battery. [CHAR LIMIT=NONE] --> <string name="notification_channel_alerts">Alerts</string> <!-- Title for the notification channel dedicated to screenshot progress. [CHAR LIMIT=NONE] --> <string name="notification_channel_screenshot">Screenshots</string> <!-- Title for the notification channel for urgent security issues. [CHAR LIMIT=NONE] --> <string name="notification_channel_security">Security</string> <!-- Title for the notification channel containing multi-user status information. [CHAR LIMIT=NONE] --> <string name="notification_channel_user_status">User status</string> <!-- Title for the notification channel for problems with storage (i.e. low disk). [CHAR LIMIT=NONE] --> <string name="notification_channel_storage">Storage</string> </resources>
packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.systemui.statusbar.SystemBars; import com.android.systemui.statusbar.phone.PhoneStatusBar; import com.android.systemui.tuner.TunerService; import com.android.systemui.usb.StorageNotification; import com.android.systemui.util.NotificationChannels; import com.android.systemui.volume.VolumeUI; import java.util.HashMap; Loading @@ -66,6 +67,7 @@ public class SystemUIApplication extends Application implements SysUiServiceProv Dependency.class, FragmentService.class, TunerService.class, NotificationChannels.class, CommandQueue.CommandQueueStart.class, KeyguardViewMediator.class, Recents.class, Loading
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +4 −4 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.systemui.R; import com.android.systemui.SystemUI; import com.android.systemui.statusbar.phone.PhoneStatusBar; import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.systemui.util.NotificationChannels; import java.io.PrintWriter; import java.text.NumberFormat; Loading Loading @@ -151,8 +152,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setOngoing(true) .setContentTitle(mContext.getString(R.string.invalid_charger_title)) .setContentText(mContext.getString(R.string.invalid_charger_text)) .setPriority(Notification.PRIORITY_MAX) .setVisibility(Notification.VISIBILITY_PUBLIC) .setChannel(NotificationChannels.ALERTS) .setColor(mContext.getColor( com.android.internal.R.color.system_notification_accent_color)); SystemUI.overrideNotificationAppName(mContext, nb); Loading @@ -173,7 +173,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setContentText(mContext.getString(textRes, percentage)) .setOnlyAlertOnce(true) .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING)) .setPriority(Notification.PRIORITY_MAX) .setChannel(NotificationChannels.ALERTS) .setVisibility(Notification.VISIBILITY_PUBLIC) .setColor(mContext.getColor( com.android.internal.R.color.battery_saver_mode_color)); Loading Loading @@ -241,7 +241,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setShowWhen(false) .setContentTitle(mContext.getString(R.string.high_temp_title)) .setContentText(mContext.getString(R.string.high_temp_notif_message)) .setPriority(Notification.PRIORITY_HIGH) .setChannel(NotificationChannels.ALERTS) .setVisibility(Notification.VISIBILITY_PUBLIC) .setContentIntent(pendingBroadcast(ACTION_CLICKED_TEMP_WARNING)) .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_TEMP_WARNING)) Loading
packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +5 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.widget.ImageView; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.systemui.R; import com.android.systemui.SystemUI; import com.android.systemui.util.NotificationChannels; import java.io.File; import java.io.FileOutputStream; Loading Loading @@ -178,6 +179,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { // The public notification will show similar info but with the actual screenshot omitted mPublicNotificationBuilder = new Notification.Builder(context) .setChannel(NotificationChannels.SCREENSHOTS) .setContentTitle(r.getString(R.string.screenshot_saving_title)) .setContentText(r.getString(R.string.screenshot_saving_text)) .setSmallIcon(R.drawable.stat_notify_image) Loading @@ -189,6 +191,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { SystemUI.overrideNotificationAppName(context, mPublicNotificationBuilder); mNotificationBuilder = new Notification.Builder(context) .setChannel(NotificationChannels.SCREENSHOTS) .setTicker(r.getString(R.string.screenshot_saving_ticker) + (mTickerAddSpace ? " " : "")) .setContentTitle(r.getString(R.string.screenshot_saving_title)) Loading Loading @@ -332,6 +335,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { // Update the text and the icon for the existing notification mPublicNotificationBuilder .setChannel(NotificationChannels.SCREENSHOTS) .setContentTitle(r.getString(R.string.screenshot_saved_title)) .setContentText(r.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0)) Loading @@ -340,6 +344,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> { .setColor(context.getColor( com.android.internal.R.color.system_notification_accent_color)); mNotificationBuilder .setChannel(NotificationChannels.SCREENSHOTS) .setContentTitle(r.getString(R.string.screenshot_saved_title)) .setContentText(r.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0)) Loading