Clarify notification blocking in notification app list.

Change summary to: Normal (nothing blocked), Partially blocked
(at least one topic blocked), or Totally blocked (entire app
blocked).

Allow filtering on apps that are partially or totally blocked.

Bug: 26882239
Change-Id: I29924147a97a3d1693b0286d48905485e11edf1d
This commit is contained in:
Julia Reynolds
2016-02-02 10:17:56 -05:00
parent cac0dddd2a
commit e07f385ae0
4 changed files with 21 additions and 2 deletions

View File

@@ -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;
}
@@ -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;
}
@@ -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 {