Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2b20548 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Better deletions"

parents e34edfc8 9bfba594
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5548,12 +5548,14 @@ package android.app {
    method public void createNotificationChannelGroups(java.util.List<android.app.NotificationChannelGroup>);
    method public void createNotificationChannels(java.util.List<android.app.NotificationChannel>);
    method public void deleteNotificationChannel(java.lang.String);
    method public void deleteNotificationChannelGroup(java.lang.String);
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String);
    method public java.util.Map<java.lang.String, android.app.AutomaticZenRule> getAutomaticZenRules();
    method public final int getCurrentInterruptionFilter();
    method public int getImportance();
    method public android.app.NotificationChannel getNotificationChannel(java.lang.String);
    method public java.util.List<android.app.NotificationChannelGroup> getNotificationChannelGroups();
    method public java.util.List<android.app.NotificationChannel> getNotificationChannels();
    method public android.app.NotificationManager.Policy getNotificationPolicy();
    method public boolean isNotificationPolicyAccessGranted();
+2 −0
Original line number Diff line number Diff line
@@ -5751,12 +5751,14 @@ package android.app {
    method public void createNotificationChannelGroups(java.util.List<android.app.NotificationChannelGroup>);
    method public void createNotificationChannels(java.util.List<android.app.NotificationChannel>);
    method public void deleteNotificationChannel(java.lang.String);
    method public void deleteNotificationChannelGroup(java.lang.String);
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String);
    method public java.util.Map<java.lang.String, android.app.AutomaticZenRule> getAutomaticZenRules();
    method public final int getCurrentInterruptionFilter();
    method public int getImportance();
    method public android.app.NotificationChannel getNotificationChannel(java.lang.String);
    method public java.util.List<android.app.NotificationChannelGroup> getNotificationChannelGroups();
    method public java.util.List<android.app.NotificationChannel> getNotificationChannels();
    method public android.app.NotificationManager.Policy getNotificationPolicy();
    method public boolean isNotificationPolicyAccessGranted();
+2 −0
Original line number Diff line number Diff line
@@ -5558,6 +5558,7 @@ package android.app {
    method public void createNotificationChannelGroups(java.util.List<android.app.NotificationChannelGroup>);
    method public void createNotificationChannels(java.util.List<android.app.NotificationChannel>);
    method public void deleteNotificationChannel(java.lang.String);
    method public void deleteNotificationChannelGroup(java.lang.String);
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String);
    method public java.util.Map<java.lang.String, android.app.AutomaticZenRule> getAutomaticZenRules();
@@ -5565,6 +5566,7 @@ package android.app {
    method public android.content.ComponentName getEffectsSuppressor();
    method public int getImportance();
    method public android.app.NotificationChannel getNotificationChannel(java.lang.String);
    method public java.util.List<android.app.NotificationChannelGroup> getNotificationChannelGroups();
    method public java.util.List<android.app.NotificationChannel> getNotificationChannels();
    method public android.app.NotificationManager.Policy getNotificationPolicy();
    method public boolean isNotificationPolicyAccessGranted();
+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ interface INotificationManager
    ParceledListSlice getNotificationChannelsForPackage(String pkg, int uid, boolean includeDeleted);
    int getNumNotificationChannelsForPackage(String pkg, int uid, boolean includeDeleted);
    int getDeletedChannelCount(String pkg, int uid);
    void deleteNotificationChannelGroup(String pkg, String channelGroupId);
    ParceledListSlice getNotificationChannelGroups(String pkg);

    // TODO: Remove this when callers have been migrated to the equivalent
    // INotificationListener method.
+24 −0
Original line number Diff line number Diff line
@@ -497,6 +497,30 @@ public class NotificationManager
        }
    }

    /**
     * Returns all notification channel groups belonging to the calling app.
     */
    public List<NotificationChannelGroup> getNotificationChannelGroups() {
        INotificationManager service = getService();
        try {
            return service.getNotificationChannelGroups(mContext.getPackageName()).getList();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Deletes the given notification channel group.
     */
    public void deleteNotificationChannelGroup(String groupId) {
        INotificationManager service = getService();
        try {
            service.deleteNotificationChannelGroup(mContext.getPackageName(), groupId);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * @hide
     */
Loading