Add strings & channel to be used for notification to review permissions.
Also changes the SYSTEM_CHANGES notification channel to be IMPORTANCE_DEFAULT (by deprecating the existing, unused one). Bug: 225373531 Test: manual by forcing the notification to show Change-Id: I9743fe08cccbd8b6a9e7b367e32fe3e597b81ec4 Merged-In: I9743fe08cccbd8b6a9e7b367e32fe3e597b81ec4
This commit is contained in:
@@ -58,7 +58,12 @@ public class SystemNotificationChannels {
|
||||
public static String USB = "USB";
|
||||
public static String FOREGROUND_SERVICE = "FOREGROUND_SERVICE";
|
||||
public static String HEAVY_WEIGHT_APP = "HEAVY_WEIGHT_APP";
|
||||
public static String SYSTEM_CHANGES = "SYSTEM_CHANGES";
|
||||
/**
|
||||
* @deprecated Legacy system changes channel with low importance which is no longer used,
|
||||
* Use the default importance {@link #SYSTEM_CHANGES} channel instead.
|
||||
*/
|
||||
@Deprecated public static String SYSTEM_CHANGES_DEPRECATED = "SYSTEM_CHANGES";
|
||||
public static String SYSTEM_CHANGES = "SYSTEM_CHANGES_ALERTS";
|
||||
public static String DO_NOT_DISTURB = "DO_NOT_DISTURB";
|
||||
public static String ACCESSIBILITY_MAGNIFICATION = "ACCESSIBILITY_MAGNIFICATION";
|
||||
public static String ACCESSIBILITY_SECURITY_POLICY = "ACCESSIBILITY_SECURITY_POLICY";
|
||||
@@ -189,7 +194,11 @@ public class SystemNotificationChannels {
|
||||
|
||||
NotificationChannel systemChanges = new NotificationChannel(SYSTEM_CHANGES,
|
||||
context.getString(R.string.notification_channel_system_changes),
|
||||
NotificationManager.IMPORTANCE_LOW);
|
||||
NotificationManager.IMPORTANCE_DEFAULT);
|
||||
systemChanges.setSound(null, new AudioAttributes.Builder()
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
|
||||
.setUsage(AudioAttributes.USAGE_NOTIFICATION)
|
||||
.build());
|
||||
channelsList.add(systemChanges);
|
||||
|
||||
NotificationChannel dndChanges = new NotificationChannel(DO_NOT_DISTURB,
|
||||
@@ -229,6 +238,7 @@ public class SystemNotificationChannels {
|
||||
public static void removeDeprecated(Context context) {
|
||||
final NotificationManager nm = context.getSystemService(NotificationManager.class);
|
||||
nm.deleteNotificationChannel(DEVICE_ADMIN_DEPRECATED);
|
||||
nm.deleteNotificationChannel(SYSTEM_CHANGES_DEPRECATED);
|
||||
}
|
||||
|
||||
public static void createAccountChannelForPackage(String pkg, int uid, Context context) {
|
||||
|
||||
@@ -5745,6 +5745,16 @@
|
||||
<!-- Content of notification indicating users can tap on the notification to go to dnd behavior settings -->
|
||||
<string name="zen_upgrade_notification_content">Tap to check what\'s blocked.</string>
|
||||
|
||||
<!-- Notification permission informational notification text -->
|
||||
<!-- Title for notification inviting users to review their notification settings [CHAR LIMIT=NONE] -->
|
||||
<string name="review_notification_settings_title">Review notification settings</string>
|
||||
<!-- Content of notification informing users of notification permission change, and inviting them to modify current settings. [CHAR LIMIT=NONE]-->
|
||||
<string name="review_notification_settings_text">In Android 13, apps that you install need your permission to send notifications. Tap to change this permission for existing apps.</string>
|
||||
<!-- Notification action text for having this notification come back later [CHAR LIMIT=20] -->
|
||||
<string name="review_notification_settings_remind_me_action">Remind me later</string>
|
||||
<!-- Notification action text to dismiss this notification [CHAR LIMIT=20]-->
|
||||
<string name="review_notification_settings_dismiss">Dismiss</string>
|
||||
|
||||
<!-- Application name displayed in notifications [CHAR LIMIT=60] -->
|
||||
<string name="notification_app_name_system">System</string>
|
||||
<!-- Application name displayed in notifications [CHAR LIMIT=60] -->
|
||||
|
||||
@@ -3891,6 +3891,11 @@
|
||||
<java-symbol type="string" name="zen_upgrade_notification_visd_title" />
|
||||
<java-symbol type="string" name="zen_upgrade_notification_visd_content" />
|
||||
|
||||
<java-symbol type="string" name="review_notification_settings_title" />
|
||||
<java-symbol type="string" name="review_notification_settings_text" />
|
||||
<java-symbol type="string" name="review_notification_settings_remind_me_action" />
|
||||
<java-symbol type="string" name="review_notification_settings_dismiss" />
|
||||
|
||||
<java-symbol type="string" name="config_managed_provisioning_package" />
|
||||
|
||||
<java-symbol type="string" name="notification_app_name_system" />
|
||||
|
||||
@@ -286,6 +286,10 @@ message SystemMessage {
|
||||
// Package: android
|
||||
NOTE_MTE_OVERRIDE_ENABLED = 69;
|
||||
|
||||
// Inform the user of notification permissions changes.
|
||||
// Package: android
|
||||
NOTE_REVIEW_NOTIFICATION_PERMISSIONS = 71;
|
||||
|
||||
// ADD_NEW_IDS_ABOVE_THIS_LINE
|
||||
// Legacy IDs with arbitrary values appear below
|
||||
// Legacy IDs existed as stable non-conflicting constants prior to the O release
|
||||
|
||||
Reference in New Issue
Block a user