Loading res/values/strings.xml +3 −1 Original line number Diff line number Diff line Loading @@ -6334,7 +6334,9 @@ <!-- App notification summary with notifications enabled [CHAR LIMIT=40] --> <string name="notifications_enabled">Normal</string> <!-- App notification summary with notifications disabled [CHAR LIMIT=40] --> <string name="notifications_disabled">Block</string> <string name="notifications_disabled">Fully Blocked</string> <!-- App notification summary with notifications disabled [CHAR LIMIT=40] --> <string name="notifications_partially_disabled">Partially Blocked</string> <!-- App notification summary with 2 items [CHAR LIMIT=15] --> <string name="notifications_two_items"><xliff:g id="notif_state" example="Priority">%1$s</xliff:g> / <xliff:g id="notif_state" example="Priority">%2$s</xliff:g></string> <!-- App notification summary with 3 items [CHAR LIMIT=15] --> Loading src/com/android/settings/applications/AppStateNotificationBridge.java +5 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,11 @@ public class AppStateNotificationBridge extends AppStateBaseBridge { @Override public boolean filterApp(AppEntry info) { return info.extraInfo != null && ((AppRow) info.extraInfo).banned; if (info == null) { return false; } AppRow row = (AppRow) info.extraInfo; return row.banned || row.bannedTopics; } }; } src/com/android/settings/applications/InstalledAppDetails.java +2 −0 Original line number Diff line number Diff line Loading @@ -821,6 +821,8 @@ public class InstalledAppDetails extends AppInfoBase public static CharSequence getNotificationSummary(AppRow appRow, Context context) { if (appRow.banned) { return context.getString(R.string.notifications_disabled); } else if (appRow.bannedTopics) { return context.getString(R.string.notifications_partially_disabled); } return context.getString(R.string.notifications_enabled); } Loading src/com/android/settings/notification/NotificationBackend.java +11 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public class NotificationBackend { row.appImportance = getImportance(row.pkg, row.uid, null); row.appBypassDnd = getBypassZenMode(row.pkg, row.uid, null); row.appSensitive = getSensitive(row.pkg, row.uid, null); row.bannedTopics = hasBannedTopics(row.pkg, row.uid); return row; } Loading Loading @@ -170,6 +171,15 @@ public class NotificationBackend { } } public boolean hasBannedTopics(String pkg, int uid) { try { return sINM.hasBannedTopics(pkg, uid); } catch (Exception e) { Log.w(TAG, "Error calling NoMan", e); return false; } } static class Row { public String section; } Loading @@ -186,6 +196,7 @@ public class NotificationBackend { public int appImportance; public boolean appBypassDnd; public boolean appSensitive; public boolean bannedTopics; } public static class TopicRow extends AppRow { Loading Loading
res/values/strings.xml +3 −1 Original line number Diff line number Diff line Loading @@ -6334,7 +6334,9 @@ <!-- App notification summary with notifications enabled [CHAR LIMIT=40] --> <string name="notifications_enabled">Normal</string> <!-- App notification summary with notifications disabled [CHAR LIMIT=40] --> <string name="notifications_disabled">Block</string> <string name="notifications_disabled">Fully Blocked</string> <!-- App notification summary with notifications disabled [CHAR LIMIT=40] --> <string name="notifications_partially_disabled">Partially Blocked</string> <!-- App notification summary with 2 items [CHAR LIMIT=15] --> <string name="notifications_two_items"><xliff:g id="notif_state" example="Priority">%1$s</xliff:g> / <xliff:g id="notif_state" example="Priority">%2$s</xliff:g></string> <!-- App notification summary with 3 items [CHAR LIMIT=15] --> Loading
src/com/android/settings/applications/AppStateNotificationBridge.java +5 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,11 @@ public class AppStateNotificationBridge extends AppStateBaseBridge { @Override public boolean filterApp(AppEntry info) { return info.extraInfo != null && ((AppRow) info.extraInfo).banned; if (info == null) { return false; } AppRow row = (AppRow) info.extraInfo; return row.banned || row.bannedTopics; } }; }
src/com/android/settings/applications/InstalledAppDetails.java +2 −0 Original line number Diff line number Diff line Loading @@ -821,6 +821,8 @@ public class InstalledAppDetails extends AppInfoBase public static CharSequence getNotificationSummary(AppRow appRow, Context context) { if (appRow.banned) { return context.getString(R.string.notifications_disabled); } else if (appRow.bannedTopics) { return context.getString(R.string.notifications_partially_disabled); } return context.getString(R.string.notifications_enabled); } Loading
src/com/android/settings/notification/NotificationBackend.java +11 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public class NotificationBackend { row.appImportance = getImportance(row.pkg, row.uid, null); row.appBypassDnd = getBypassZenMode(row.pkg, row.uid, null); row.appSensitive = getSensitive(row.pkg, row.uid, null); row.bannedTopics = hasBannedTopics(row.pkg, row.uid); return row; } Loading Loading @@ -170,6 +171,15 @@ public class NotificationBackend { } } public boolean hasBannedTopics(String pkg, int uid) { try { return sINM.hasBannedTopics(pkg, uid); } catch (Exception e) { Log.w(TAG, "Error calling NoMan", e); return false; } } static class Row { public String section; } Loading @@ -186,6 +196,7 @@ public class NotificationBackend { public int appImportance; public boolean appBypassDnd; public boolean appSensitive; public boolean bannedTopics; } public static class TopicRow extends AppRow { Loading