Fix text in notification settings for apps that do not send notifications am: e899b4c96c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20283152 Change-Id: Ic748f560f9a4767b6c75349506ae569cde1473af Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -126,6 +126,7 @@ public class NotificationBackend {
|
||||
if (app.requestedPermissions == null || Arrays.stream(app.requestedPermissions)
|
||||
.noneMatch(p -> p.equals(android.Manifest.permission.POST_NOTIFICATIONS))) {
|
||||
row.lockedImportance = true;
|
||||
row.permissionStateLocked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -684,6 +685,9 @@ public class NotificationBackend {
|
||||
public boolean systemApp;
|
||||
public boolean lockedImportance;
|
||||
public boolean showBadge;
|
||||
// For apps target T but have not but has not requested the permission
|
||||
// we cannot change the permission state
|
||||
public boolean permissionStateLocked;
|
||||
public int bubblePreference = NotificationManager.BUBBLE_PREFERENCE_NONE;
|
||||
public int userId;
|
||||
public int blockedChannelCount;
|
||||
|
@@ -62,6 +62,8 @@ public class NotificationsOffPreferenceController extends NotificationPreference
|
||||
preference.setTitle(R.string.channel_notifications_off_desc);
|
||||
} else if (mChannelGroup != null) {
|
||||
preference.setTitle(R.string.channel_group_notifications_off_desc);
|
||||
} else if (mAppRow.permissionStateLocked) {
|
||||
preference.setTitle(R.string.app_notifications_not_send_desc);
|
||||
} else {
|
||||
preference.setTitle(R.string.app_notifications_off_desc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user