Add settings page for notification channel groups

Bug: 63927402
Test: tests/unit/src/com/android/settings/notification/.*
Change-Id: Iebf7d8ba54f0cf5801a42f3161354d3cc5e5c848
This commit is contained in:
Julia Reynolds
2017-08-25 09:40:24 -04:00
parent 8fabdba0de
commit 0c3f4bce57
14 changed files with 751 additions and 127 deletions

View File

@@ -136,8 +136,7 @@ public class NotificationBackend {
}
}
public NotificationChannelGroup getGroup(String groupId, String pkg, int uid) {
public NotificationChannelGroup getGroup(String pkg, int uid, String groupId) {
if (groupId == null) {
return null;
}
@@ -149,7 +148,19 @@ public class NotificationBackend {
}
}
public ParceledListSlice<NotificationChannelGroup> getChannelGroups(String pkg, int uid) {
public NotificationChannelGroup getGroupWithChannels(String pkg, int uid, String groupId) {
if (groupId == null) {
return null;
}
try {
return sINM.getPopulatedNotificationChannelGroupForPackage(pkg, uid, groupId, true);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
return null;
}
}
public ParceledListSlice<NotificationChannelGroup> getGroups(String pkg, int uid) {
try {
return sINM.getNotificationChannelGroupsForPackage(pkg, uid, false);
} catch (Exception e) {
@@ -166,6 +177,15 @@ public class NotificationBackend {
}
}
public void updateChannelGroup(String pkg, int uid, NotificationChannelGroup group) {
try {
sINM.updateNotificationChannelGroupForPackage(pkg, uid, group);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
}
}
public int getDeletedChannelCount(String pkg, int uid) {
try {
return sINM.getDeletedChannelCount(pkg, uid);