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

Commit 73ed76bc authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Allow companion device mgrs channel access

- Callbacks when channels and groups are modified
- Allow them to read and update channels and groups

Test: runtest systemui-notification
Change-Id: Ie4d02bd4583f71f9faf27603bcc59a1ec0eeaf46
parent c62250ad
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -37306,12 +37306,16 @@ package android.service.notification {
    method public final int getCurrentInterruptionFilter();
    method public final int getCurrentListenerHints();
    method public android.service.notification.NotificationListenerService.RankingMap getCurrentRanking();
    method public final java.util.List<android.app.NotificationChannelGroup> getNotificationChannelGroups(java.lang.String);
    method public final java.util.List<android.app.NotificationChannel> getNotificationChannels(java.lang.String);
    method public final android.service.notification.StatusBarNotification[] getSnoozedNotifications();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onInterruptionFilterChanged(int);
    method public void onListenerConnected();
    method public void onListenerDisconnected();
    method public void onListenerHintsChanged(int);
    method public void onNotificationChannelGroupModified(java.lang.String, android.app.NotificationChannelGroup, int);
    method public void onNotificationChannelModified(java.lang.String, android.app.NotificationChannel, int);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
    method public void onNotificationRankingUpdate(android.service.notification.NotificationListenerService.RankingMap);
@@ -37324,6 +37328,7 @@ package android.service.notification {
    method public final void requestUnbind();
    method public final void setNotificationsShown(java.lang.String[]);
    method public final void snoozeNotification(java.lang.String, long);
    method public final void updateNotificationChannel(java.lang.String, android.app.NotificationChannel);
    field public static final int HINT_HOST_DISABLE_CALL_EFFECTS = 4; // 0x4
    field public static final int HINT_HOST_DISABLE_EFFECTS = 1; // 0x1
    field public static final int HINT_HOST_DISABLE_NOTIFICATION_EFFECTS = 2; // 0x2
@@ -37332,6 +37337,9 @@ package android.service.notification {
    field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3
    field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2
    field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_ADDED = 1; // 0x1
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_DELETED = 3; // 0x3
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_UPDATED = 2; // 0x2
    field public static final int REASON_APP_CANCEL = 8; // 0x8
    field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9
    field public static final int REASON_CANCEL = 2; // 0x2
+8 −0
Original line number Diff line number Diff line
@@ -40430,12 +40430,16 @@ package android.service.notification {
    method public final int getCurrentInterruptionFilter();
    method public final int getCurrentListenerHints();
    method public android.service.notification.NotificationListenerService.RankingMap getCurrentRanking();
    method public final java.util.List<android.app.NotificationChannelGroup> getNotificationChannelGroups(java.lang.String);
    method public final java.util.List<android.app.NotificationChannel> getNotificationChannels(java.lang.String);
    method public final android.service.notification.StatusBarNotification[] getSnoozedNotifications();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onInterruptionFilterChanged(int);
    method public void onListenerConnected();
    method public void onListenerDisconnected();
    method public void onListenerHintsChanged(int);
    method public void onNotificationChannelGroupModified(java.lang.String, android.app.NotificationChannelGroup, int);
    method public void onNotificationChannelModified(java.lang.String, android.app.NotificationChannel, int);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
    method public void onNotificationRankingUpdate(android.service.notification.NotificationListenerService.RankingMap);
@@ -40452,6 +40456,7 @@ package android.service.notification {
    method public final void snoozeNotification(java.lang.String, java.lang.String);
    method public final void snoozeNotification(java.lang.String, long);
    method public void unregisterAsSystemService() throws android.os.RemoteException;
    method public final void updateNotificationChannel(java.lang.String, android.app.NotificationChannel);
    field public static final int HINT_HOST_DISABLE_CALL_EFFECTS = 4; // 0x4
    field public static final int HINT_HOST_DISABLE_EFFECTS = 1; // 0x1
    field public static final int HINT_HOST_DISABLE_NOTIFICATION_EFFECTS = 2; // 0x2
@@ -40460,6 +40465,9 @@ package android.service.notification {
    field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3
    field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2
    field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_ADDED = 1; // 0x1
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_DELETED = 3; // 0x3
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_UPDATED = 2; // 0x2
    field public static final int REASON_APP_CANCEL = 8; // 0x8
    field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9
    field public static final int REASON_CANCEL = 2; // 0x2
+8 −0
Original line number Diff line number Diff line
@@ -37491,12 +37491,16 @@ package android.service.notification {
    method public final int getCurrentInterruptionFilter();
    method public final int getCurrentListenerHints();
    method public android.service.notification.NotificationListenerService.RankingMap getCurrentRanking();
    method public final java.util.List<android.app.NotificationChannelGroup> getNotificationChannelGroups(java.lang.String);
    method public final java.util.List<android.app.NotificationChannel> getNotificationChannels(java.lang.String);
    method public final android.service.notification.StatusBarNotification[] getSnoozedNotifications();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onInterruptionFilterChanged(int);
    method public void onListenerConnected();
    method public void onListenerDisconnected();
    method public void onListenerHintsChanged(int);
    method public void onNotificationChannelGroupModified(java.lang.String, android.app.NotificationChannelGroup, int);
    method public void onNotificationChannelModified(java.lang.String, android.app.NotificationChannel, int);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
    method public void onNotificationRankingUpdate(android.service.notification.NotificationListenerService.RankingMap);
@@ -37510,6 +37514,7 @@ package android.service.notification {
    method public final void setNotificationsShown(java.lang.String[]);
    method public final void snoozeNotification(java.lang.String, java.lang.String);
    method public final void snoozeNotification(java.lang.String, long);
    method public final void updateNotificationChannel(java.lang.String, android.app.NotificationChannel);
    field public static final int HINT_HOST_DISABLE_CALL_EFFECTS = 4; // 0x4
    field public static final int HINT_HOST_DISABLE_EFFECTS = 1; // 0x1
    field public static final int HINT_HOST_DISABLE_NOTIFICATION_EFFECTS = 2; // 0x2
@@ -37518,6 +37523,9 @@ package android.service.notification {
    field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3
    field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2
    field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_ADDED = 1; // 0x1
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_DELETED = 3; // 0x3
    field public static final int NOTIFICATION_CHANNEL_OR_GROUP_UPDATED = 2; // 0x2
    field public static final int REASON_APP_CANCEL = 8; // 0x8
    field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9
    field public static final int REASON_CANCEL = 2; // 0x2
+4 −0
Original line number Diff line number Diff line
@@ -101,6 +101,10 @@ interface INotificationManager
    void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim);
    void setInterruptionFilter(String pkg, int interruptionFilter);

    void updateNotificationChannelFromPrivilegedListener(in INotificationListener token, String pkg, in NotificationChannel channel);
    ParceledListSlice getNotificationChannelsFromPrivilegedListener(in INotificationListener token, String pkg);
    ParceledListSlice getNotificationChannelGroupsFromPrivilegedListener(in INotificationListener token, String pkg);

    void applyEnqueuedAdjustmentFromAssistant(in INotificationListener token, in Adjustment adjustment);
    void applyAdjustmentFromAssistant(in INotificationListener token, in Adjustment adjustment);
    void applyAdjustmentsFromAssistant(in INotificationListener token, in List<Adjustment> adjustments);
+6 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.service.notification;

import android.app.NotificationChannel;
import android.app.NotificationChannelGroup;
import android.service.notification.IStatusBarNotificationHolder;
import android.service.notification.StatusBarNotification;
import android.service.notification.NotificationRankingUpdate;
@@ -33,6 +35,10 @@ oneway interface INotificationListener
    void onListenerHintsChanged(int hints);
    void onInterruptionFilterChanged(int interruptionFilter);

    // companion device managers only
    void onNotificationChannelModification(String pkgName, in NotificationChannel channel, int modificationType);
    void onNotificationChannelGroupModification(String pkgName, in NotificationChannelGroup group, int modificationType);

    // rankers only
    void onNotificationEnqueued(in IStatusBarNotificationHolder notificationHolder);
    void onNotificationSnoozedUntilContext(in IStatusBarNotificationHolder notificationHolder, String snoozeCriterionId);
Loading