Loading core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3223,6 +3223,9 @@ <!-- Alert windows notification strings --> <skip /> <!-- Name of notification channel group the system post notification to inform the use about apps that are drawing ui on-top of other apps (alert-windows) [CHAR LIMIT=NONE] --> <string name="alert_windows_notification_channel_group_name">Display over other apps</string> <!-- Name of notification channel the system post notification to inform the use about apps that are drawing ui on-top of other apps (alert-windows) [CHAR LIMIT=NONE] --> <string name="alert_windows_notification_channel_name"><xliff:g id="name" example="Google Maps">%s</xliff:g> displaying over other apps</string> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2946,6 +2946,7 @@ <java-symbol type="drawable" name="resolver_icon_placeholder" /> <!-- Alert windows notification --> <java-symbol type="string" name="alert_windows_notification_channel_group_name" /> <java-symbol type="string" name="alert_windows_notification_channel_name" /> <java-symbol type="string" name="alert_windows_notification_title" /> <java-symbol type="string" name="alert_windows_notification_message" /> Loading services/core/java/com/android/server/wm/AlertWindowNotification.java +9 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static android.provider.Settings.ACTION_MANAGE_OVERLAY_PERMISSION; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; Loading @@ -45,6 +46,7 @@ class AlertWindowNotification { private static final int NOTIFICATION_ID = 0; private static int sNextRequestCode = 0; private static NotificationChannelGroup sChannelGroup; private final int mRequestCode; private final WindowManagerService mService; private String mNotificationTag; Loading @@ -61,6 +63,12 @@ class AlertWindowNotification { mNotificationTag = CHANNEL_PREFIX + mPackageName; mRequestCode = sNextRequestCode++; mIconUtilities = new IconUtilities(mService.mContext); if (sChannelGroup == null) { sChannelGroup = new NotificationChannelGroup(CHANNEL_PREFIX, mService.mContext.getString( R.string.alert_windows_notification_channel_group_name)); mNotificationManager.createNotificationChannelGroup(sChannelGroup); } } void post() { Loading Loading @@ -142,6 +150,7 @@ class AlertWindowNotification { channel.enableLights(false); channel.enableVibration(false); channel.setBlockableSystem(true); channel.setGroup(sChannelGroup.getId()); mNotificationManager.createNotificationChannel(channel); } Loading Loading
core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3223,6 +3223,9 @@ <!-- Alert windows notification strings --> <skip /> <!-- Name of notification channel group the system post notification to inform the use about apps that are drawing ui on-top of other apps (alert-windows) [CHAR LIMIT=NONE] --> <string name="alert_windows_notification_channel_group_name">Display over other apps</string> <!-- Name of notification channel the system post notification to inform the use about apps that are drawing ui on-top of other apps (alert-windows) [CHAR LIMIT=NONE] --> <string name="alert_windows_notification_channel_name"><xliff:g id="name" example="Google Maps">%s</xliff:g> displaying over other apps</string> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2946,6 +2946,7 @@ <java-symbol type="drawable" name="resolver_icon_placeholder" /> <!-- Alert windows notification --> <java-symbol type="string" name="alert_windows_notification_channel_group_name" /> <java-symbol type="string" name="alert_windows_notification_channel_name" /> <java-symbol type="string" name="alert_windows_notification_title" /> <java-symbol type="string" name="alert_windows_notification_message" /> Loading
services/core/java/com/android/server/wm/AlertWindowNotification.java +9 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static android.provider.Settings.ACTION_MANAGE_OVERLAY_PERMISSION; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; Loading @@ -45,6 +46,7 @@ class AlertWindowNotification { private static final int NOTIFICATION_ID = 0; private static int sNextRequestCode = 0; private static NotificationChannelGroup sChannelGroup; private final int mRequestCode; private final WindowManagerService mService; private String mNotificationTag; Loading @@ -61,6 +63,12 @@ class AlertWindowNotification { mNotificationTag = CHANNEL_PREFIX + mPackageName; mRequestCode = sNextRequestCode++; mIconUtilities = new IconUtilities(mService.mContext); if (sChannelGroup == null) { sChannelGroup = new NotificationChannelGroup(CHANNEL_PREFIX, mService.mContext.getString( R.string.alert_windows_notification_channel_group_name)); mNotificationManager.createNotificationChannelGroup(sChannelGroup); } } void post() { Loading Loading @@ -142,6 +150,7 @@ class AlertWindowNotification { channel.enableLights(false); channel.enableVibration(false); channel.setBlockableSystem(true); channel.setGroup(sChannelGroup.getId()); mNotificationManager.createNotificationChannel(channel); } Loading