The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* //device/java/android/android/app/INotificationManager.aidl |
| 2 | ** |
| 3 | ** Copyright 2007, The Android Open Source Project |
| 4 | ** |
Geoffrey Pitsch | e75a66e | 2016-11-22 11:12:11 -0500 | [diff] [blame] | 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | ** you may not use this file except in compliance with the License. |
| 7 | ** You may obtain a copy of the License at |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8 | ** |
Geoffrey Pitsch | e75a66e | 2016-11-22 11:12:11 -0500 | [diff] [blame] | 9 | ** http://www.apache.org/licenses/LICENSE-2.0 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 10 | ** |
Geoffrey Pitsch | e75a66e | 2016-11-22 11:12:11 -0500 | [diff] [blame] | 11 | ** Unless required by applicable law or agreed to in writing, software |
| 12 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | ** See the License for the specific language governing permissions and |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 15 | ** limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | package android.app; |
| 19 | |
| 20 | import android.app.ITransientNotification; |
Bernardo Rufino | ab338ac | 2019-12-20 18:35:30 +0000 | [diff] [blame] | 21 | import android.app.ITransientNotificationCallback; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | import android.app.Notification; |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 23 | import android.app.NotificationChannel; |
Geoffrey Pitsch | df44b60 | 2017-02-03 13:31:50 -0500 | [diff] [blame] | 24 | import android.app.NotificationChannelGroup; |
Julia Reynolds | b317ff7 | 2019-11-26 14:20:51 -0500 | [diff] [blame] | 25 | import android.app.NotificationHistory; |
John Spurlock | 1fc476d | 2015-04-14 16:05:20 -0400 | [diff] [blame] | 26 | import android.app.NotificationManager; |
Daniel Sandler | 5feceeb | 2013-03-22 18:29:23 -0700 | [diff] [blame] | 27 | import android.content.ComponentName; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | import android.content.Intent; |
Christoph Studer | cee44ba | 2014-05-20 18:36:43 +0200 | [diff] [blame] | 29 | import android.content.pm.ParceledListSlice; |
John Spurlock | e77bb36 | 2014-04-26 10:24:59 -0400 | [diff] [blame] | 30 | import android.net.Uri; |
John Spurlock | 2b122f4 | 2014-08-27 16:29:47 -0400 | [diff] [blame] | 31 | import android.os.Bundle; |
Julia Reynolds | f27d6b2 | 2017-04-13 15:48:16 -0400 | [diff] [blame] | 32 | import android.os.UserHandle; |
Julia Reynolds | e46bb37 | 2016-03-17 11:05:58 -0400 | [diff] [blame] | 33 | import android.service.notification.Adjustment; |
John Spurlock | 7340fc8 | 2014-04-24 18:50:12 -0400 | [diff] [blame] | 34 | import android.service.notification.Condition; |
John Spurlock | e77bb36 | 2014-04-26 10:24:59 -0400 | [diff] [blame] | 35 | import android.service.notification.IConditionListener; |
John Spurlock | 7340fc8 | 2014-04-24 18:50:12 -0400 | [diff] [blame] | 36 | import android.service.notification.IConditionProvider; |
Daniel Sandler | 5feceeb | 2013-03-22 18:29:23 -0700 | [diff] [blame] | 37 | import android.service.notification.INotificationListener; |
John Spurlock | e77bb36 | 2014-04-26 10:24:59 -0400 | [diff] [blame] | 38 | import android.service.notification.StatusBarNotification; |
Julia Reynolds | a47a27f | 2015-08-24 08:31:47 -0400 | [diff] [blame] | 39 | import android.app.AutomaticZenRule; |
John Spurlock | 056c519 | 2014-04-20 21:52:01 -0400 | [diff] [blame] | 40 | import android.service.notification.ZenModeConfig; |
Daniel Sandler | fde19b1 | 2013-01-17 00:21:05 -0500 | [diff] [blame] | 41 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | /** {@hide} */ |
| 43 | interface INotificationManager |
| 44 | { |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 45 | @UnsupportedAppUsage |
Dianne Hackborn | 4120375 | 2012-08-31 14:05:51 -0700 | [diff] [blame] | 46 | void cancelAllNotifications(String pkg, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 47 | |
Julia Reynolds | 5355e85 | 2017-02-07 14:54:13 -0500 | [diff] [blame] | 48 | void clearData(String pkg, int uid, boolean fromApp); |
Bernardo Rufino | ab338ac | 2019-12-20 18:35:30 +0000 | [diff] [blame] | 49 | void enqueueTextToast(String pkg, IBinder token, CharSequence text, int duration, int displayId, @nullable ITransientNotificationCallback callback); |
Bernardo Rufino | 52af6db | 2019-12-20 18:26:07 +0000 | [diff] [blame] | 50 | void enqueueToast(String pkg, IBinder token, ITransientNotification callback, int duration, int displayId); |
Bernardo Rufino | 2f167d3 | 2020-02-04 22:32:34 +0000 | [diff] [blame] | 51 | // TODO(b/144152069): Remove this after assessing impact on dogfood. |
| 52 | void enqueueTextOrCustomToast(String pkg, IBinder token, ITransientNotification callback, int duration, int displayId, boolean isCustom); |
Bernardo Rufino | 52af6db | 2019-12-20 18:26:07 +0000 | [diff] [blame] | 53 | void cancelToast(String pkg, IBinder token); |
| 54 | void finishToken(String pkg, IBinder token); |
Robert Carr | 99742734 | 2018-02-28 18:06:10 -0800 | [diff] [blame] | 55 | |
Christoph Studer | 8fd7f1e | 2014-04-11 17:35:05 -0400 | [diff] [blame] | 56 | void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id, |
Julia Reynolds | fea6f7b | 2017-04-19 13:50:12 -0400 | [diff] [blame] | 57 | in Notification notification, int userId); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 58 | @UnsupportedAppUsage |
Julia Reynolds | e4a47dd | 2019-06-07 13:40:59 -0400 | [diff] [blame] | 59 | void cancelNotificationWithTag(String pkg, String opPkg, String tag, int id, int userId); |
Daniel Sandler | 0da673f | 2012-04-11 12:33:16 -0400 | [diff] [blame] | 60 | |
Julia Reynolds | 924eed1 | 2017-01-19 09:52:07 -0500 | [diff] [blame] | 61 | void setShowBadge(String pkg, int uid, boolean showBadge); |
| 62 | boolean canShowBadge(String pkg, int uid); |
Daniel Sandler | 4a900ac | 2013-01-30 14:04:10 -0500 | [diff] [blame] | 63 | void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); |
Rohan Shah | 590e1b2 | 2018-04-10 23:48:47 -0400 | [diff] [blame] | 64 | /** |
| 65 | * Updates the notification's enabled state. Additionally locks importance for all of the |
| 66 | * notifications belonging to the app, such that future notifications aren't reconsidered for |
| 67 | * blocking helper. |
| 68 | */ |
| 69 | void setNotificationsEnabledWithImportanceLockForPackage(String pkg, int uid, boolean enabled); |
| 70 | |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 71 | @UnsupportedAppUsage |
Daniel Sandler | 4a900ac | 2013-01-30 14:04:10 -0500 | [diff] [blame] | 72 | boolean areNotificationsEnabledForPackage(String pkg, int uid); |
Julia Reynolds | 81afbcd | 2016-02-09 14:54:08 -0500 | [diff] [blame] | 73 | boolean areNotificationsEnabled(String pkg); |
Julia Reynolds | ef37f28 | 2016-02-12 09:11:27 -0500 | [diff] [blame] | 74 | int getPackageImportance(String pkg); |
Chris Wren | 3ad4e3a | 2014-09-02 17:23:51 -0400 | [diff] [blame] | 75 | |
Julia Reynolds | 088c448 | 2019-04-10 12:43:27 -0400 | [diff] [blame] | 76 | List<String> getAllowedAssistantAdjustments(String pkg); |
| 77 | void allowAssistantAdjustment(String adjustmentType); |
| 78 | void disallowAssistantAdjustment(String adjustmentType); |
Julia Reynolds | ad6dd35 | 2019-03-07 16:46:22 -0500 | [diff] [blame] | 79 | |
Julia Reynolds | 12ad7ca | 2019-01-28 09:29:16 -0500 | [diff] [blame] | 80 | boolean shouldHideSilentStatusIcons(String callingPkg); |
| 81 | void setHideSilentStatusIcons(boolean hide); |
| 82 | |
Mady Mellor | c39b4ae | 2019-01-09 17:11:37 -0800 | [diff] [blame] | 83 | void setBubblesAllowed(String pkg, int uid, boolean allowed); |
| 84 | boolean areBubblesAllowed(String pkg); |
| 85 | boolean areBubblesAllowedForPackage(String pkg, int uid); |
Mady Mellor | 9db685a | 2019-01-23 13:23:37 -0800 | [diff] [blame] | 86 | boolean hasUserApprovedBubblesForPackage(String pkg, int uid); |
Julia Reynolds | 33ab8a0 | 2018-12-17 16:19:52 -0500 | [diff] [blame] | 87 | |
Julia Reynolds | 59e152e | 2017-01-25 17:42:53 -0500 | [diff] [blame] | 88 | void createNotificationChannelGroups(String pkg, in ParceledListSlice channelGroupList); |
Geoffrey Pitsch | 0353371 | 2017-01-05 10:30:07 -0500 | [diff] [blame] | 89 | void createNotificationChannels(String pkg, in ParceledListSlice channelsList); |
Geoffrey Pitsch | 3560f84 | 2017-03-22 16:42:43 -0400 | [diff] [blame] | 90 | void createNotificationChannelsForPackage(String pkg, int uid, in ParceledListSlice channelsList); |
Julia Reynolds | 0297145 | 2020-02-14 16:44:19 -0500 | [diff] [blame] | 91 | ParceledListSlice getConversations(boolean onlyImportant); |
Julia Reynolds | 882f206 | 2020-02-05 12:11:38 -0500 | [diff] [blame] | 92 | ParceledListSlice getConversationsForPackage(String pkg, int uid); |
Julia Reynolds | 59e152e | 2017-01-25 17:42:53 -0500 | [diff] [blame] | 93 | ParceledListSlice getNotificationChannelGroupsForPackage(String pkg, int uid, boolean includeDeleted); |
Geoffrey Pitsch | df44b60 | 2017-02-03 13:31:50 -0500 | [diff] [blame] | 94 | NotificationChannelGroup getNotificationChannelGroupForPackage(String groupId, String pkg, int uid); |
Julia Reynolds | 005c8b9 | 2017-08-24 10:35:53 -0400 | [diff] [blame] | 95 | NotificationChannelGroup getPopulatedNotificationChannelGroupForPackage(String pkg, int uid, String groupId, boolean includeDeleted); |
| 96 | void updateNotificationChannelGroupForPackage(String pkg, int uid, in NotificationChannelGroup group); |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 97 | void updateNotificationChannelForPackage(String pkg, int uid, in NotificationChannel channel); |
Julia Reynolds | b4a9e9c | 2019-03-20 15:46:08 -0400 | [diff] [blame] | 98 | NotificationChannel getNotificationChannel(String callingPkg, int userId, String pkg, String channelId); |
Julia Reynolds | 12ba4cf | 2020-01-10 16:01:38 -0500 | [diff] [blame] | 99 | NotificationChannel getConversationNotificationChannel(String callingPkg, int userId, String pkg, String channelId, boolean returnParentIfNoConversationChannel, String conversationId); |
Julia Reynolds | 7c26752 | 2020-01-16 11:26:41 -0500 | [diff] [blame] | 100 | void createConversationNotificationChannelForPackage(String pkg, int uid, String triggeringKey, in NotificationChannel parentChannel, String conversationId); |
Julia Reynolds | 882f206 | 2020-02-05 12:11:38 -0500 | [diff] [blame] | 101 | NotificationChannel getNotificationChannelForPackage(String pkg, int uid, String channelId, String conversationId, boolean includeDeleted); |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 102 | void deleteNotificationChannel(String pkg, String channelId); |
Julia Reynolds | 0f76734 | 2019-12-18 09:11:55 -0500 | [diff] [blame] | 103 | void deleteConversationNotificationChannels(String pkg, int uid, String conversationId); |
Julia Reynolds | b4a9e9c | 2019-03-20 15:46:08 -0400 | [diff] [blame] | 104 | ParceledListSlice getNotificationChannels(String callingPkg, String targetPkg, int userId); |
Julia Reynolds | 4036e8d | 2017-01-13 09:50:05 -0500 | [diff] [blame] | 105 | ParceledListSlice getNotificationChannelsForPackage(String pkg, int uid, boolean includeDeleted); |
Geoffrey Pitsch | df44b60 | 2017-02-03 13:31:50 -0500 | [diff] [blame] | 106 | int getNumNotificationChannelsForPackage(String pkg, int uid, boolean includeDeleted); |
Julia Reynolds | 41103f4 | 2017-03-15 11:36:35 -0400 | [diff] [blame] | 107 | int getDeletedChannelCount(String pkg, int uid); |
Julia Reynolds | f2e499d | 2018-03-30 10:36:42 -0400 | [diff] [blame] | 108 | int getBlockedChannelCount(String pkg, int uid); |
Julia Reynolds | 9bfba59 | 2017-03-15 14:03:55 -0400 | [diff] [blame] | 109 | void deleteNotificationChannelGroup(String pkg, String channelGroupId); |
Julia Reynolds | 3eb3ffd | 2017-11-16 10:11:32 -0500 | [diff] [blame] | 110 | NotificationChannelGroup getNotificationChannelGroup(String pkg, String channelGroupId); |
Julia Reynolds | 9bfba59 | 2017-03-15 14:03:55 -0400 | [diff] [blame] | 111 | ParceledListSlice getNotificationChannelGroups(String pkg); |
Julia Reynolds | 17717f5 | 2017-05-09 11:46:06 -0400 | [diff] [blame] | 112 | boolean onlyHasDefaultChannel(String pkg, int uid); |
Julia Reynolds | e273f08 | 2018-04-12 13:48:49 -0400 | [diff] [blame] | 113 | int getBlockedAppCount(int userId); |
Beverly | 86d076f | 2018-04-17 14:44:52 -0400 | [diff] [blame] | 114 | boolean areChannelsBypassingDnd(); |
Beverly | 0479cde2 | 2018-11-09 11:05:34 -0500 | [diff] [blame] | 115 | int getAppsBypassingDndCount(int uid); |
| 116 | ParceledListSlice getNotificationChannelsBypassingDnd(String pkg, int userId); |
Julia Reynolds | b40cd09 | 2019-01-25 09:35:02 -0500 | [diff] [blame] | 117 | boolean isPackagePaused(String pkg); |
Julia Reynolds | b1a7718 | 2020-02-06 16:38:10 -0500 | [diff] [blame] | 118 | void deleteNotificationHistoryItem(String pkg, int uid, long postedTime); |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 119 | |
Julia Reynolds | deb2d0b | 2019-06-17 15:34:26 -0400 | [diff] [blame] | 120 | void silenceNotificationSound(); |
| 121 | |
Christoph Studer | cee44ba | 2014-05-20 18:36:43 +0200 | [diff] [blame] | 122 | // TODO: Remove this when callers have been migrated to the equivalent |
| 123 | // INotificationListener method. |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 124 | @UnsupportedAppUsage |
Daniel Sandler | fde19b1 | 2013-01-17 00:21:05 -0500 | [diff] [blame] | 125 | StatusBarNotification[] getActiveNotifications(String callingPkg); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 126 | @UnsupportedAppUsage |
Julia Reynolds | 27e2644 | 2020-02-11 11:31:35 -0500 | [diff] [blame] | 127 | StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count, boolean includeSnoozed); |
Daniel Sandler | 09a247e | 2013-02-14 10:24:17 -0500 | [diff] [blame] | 128 | |
Julia Reynolds | b317ff7 | 2019-11-26 14:20:51 -0500 | [diff] [blame] | 129 | NotificationHistory getNotificationHistory(String callingPkg); |
| 130 | |
Chris Wren | 0efdb88 | 2016-03-01 17:17:47 -0500 | [diff] [blame] | 131 | void registerListener(in INotificationListener listener, in ComponentName component, int userid); |
Daniel Sandler | 09a247e | 2013-02-14 10:24:17 -0500 | [diff] [blame] | 132 | void unregisterListener(in INotificationListener listener, int userid); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 133 | |
Daniel Sandler | e6f7f2e | 2013-04-25 15:44:16 -0400 | [diff] [blame] | 134 | void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id); |
John Spurlock | a429429 | 2014-03-24 18:02:32 -0400 | [diff] [blame] | 135 | void cancelNotificationsFromListener(in INotificationListener token, in String[] keys); |
Daniel Sandler | 25cf8ce | 2013-04-24 15:34:57 -0400 | [diff] [blame] | 136 | |
Julia Reynolds | 7967230 | 2017-01-12 08:30:16 -0500 | [diff] [blame] | 137 | void snoozeNotificationUntilContextFromListener(in INotificationListener token, String key, String snoozeCriterionId); |
Julia Reynolds | b6c1f99 | 2016-11-22 09:26:46 -0500 | [diff] [blame] | 138 | void snoozeNotificationUntilFromListener(in INotificationListener token, String key, long until); |
Julia Reynolds | 72f1cbb | 2016-09-19 14:57:31 -0400 | [diff] [blame] | 139 | |
Chris Wren | ab41eec | 2016-01-04 18:01:27 -0500 | [diff] [blame] | 140 | void requestBindListener(in ComponentName component); |
| 141 | void requestUnbindListener(in INotificationListener token); |
Julia Reynolds | 38e6ca4 | 2016-08-08 08:38:09 -0400 | [diff] [blame] | 142 | void requestBindProvider(in ComponentName component); |
| 143 | void requestUnbindProvider(in IConditionProvider token); |
Chris Wren | ab41eec | 2016-01-04 18:01:27 -0500 | [diff] [blame] | 144 | |
Amith Yamasani | f47e51e | 2015-04-17 10:02:15 -0700 | [diff] [blame] | 145 | void setNotificationsShownFromListener(in INotificationListener token, in String[] keys); |
| 146 | |
Christoph Studer | b82bc78 | 2014-08-20 14:29:43 +0200 | [diff] [blame] | 147 | ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token, in String[] keys, int trim); |
Julia Reynolds | cf63ff1 | 2017-01-24 13:55:48 -0500 | [diff] [blame] | 148 | ParceledListSlice getSnoozedNotificationsFromListener(in INotificationListener token, int trim); |
Julia Reynolds | 4703bac | 2018-09-12 10:39:30 -0400 | [diff] [blame] | 149 | void clearRequestedListenerHints(in INotificationListener token); |
John Spurlock | d8afe3c | 2014-08-01 14:04:07 -0400 | [diff] [blame] | 150 | void requestHintsFromListener(in INotificationListener token, int hints); |
| 151 | int getHintsFromListener(in INotificationListener token); |
Christoph Studer | 85a384b | 2014-08-27 20:16:15 +0200 | [diff] [blame] | 152 | void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter); |
| 153 | int getInterruptionFilterFromListener(in INotificationListener token); |
Christoph Studer | b82bc78 | 2014-08-20 14:29:43 +0200 | [diff] [blame] | 154 | void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim); |
John Spurlock | 8077493 | 2015-05-07 17:38:50 -0400 | [diff] [blame] | 155 | void setInterruptionFilter(String pkg, int interruptionFilter); |
John Spurlock | 056c519 | 2014-04-20 21:52:01 -0400 | [diff] [blame] | 156 | |
Julia Reynolds | 005c8b9 | 2017-08-24 10:35:53 -0400 | [diff] [blame] | 157 | void updateNotificationChannelGroupFromPrivilegedListener(in INotificationListener token, String pkg, in UserHandle user, in NotificationChannelGroup group); |
Julia Reynolds | f27d6b2 | 2017-04-13 15:48:16 -0400 | [diff] [blame] | 158 | void updateNotificationChannelFromPrivilegedListener(in INotificationListener token, String pkg, in UserHandle user, in NotificationChannel channel); |
| 159 | ParceledListSlice getNotificationChannelsFromPrivilegedListener(in INotificationListener token, String pkg, in UserHandle user); |
| 160 | ParceledListSlice getNotificationChannelGroupsFromPrivilegedListener(in INotificationListener token, String pkg, in UserHandle user); |
Julia Reynolds | 73ed76b | 2017-04-04 17:04:38 -0400 | [diff] [blame] | 161 | |
Julia Reynolds | 4b82f6d | 2017-01-04 10:47:41 -0500 | [diff] [blame] | 162 | void applyEnqueuedAdjustmentFromAssistant(in INotificationListener token, in Adjustment adjustment); |
Julia Reynolds | 52e64d0 | 2016-12-09 15:36:12 -0500 | [diff] [blame] | 163 | void applyAdjustmentFromAssistant(in INotificationListener token, in Adjustment adjustment); |
| 164 | void applyAdjustmentsFromAssistant(in INotificationListener token, in List<Adjustment> adjustments); |
Julia Reynolds | cf63ff1 | 2017-01-24 13:55:48 -0500 | [diff] [blame] | 165 | void unsnoozeNotificationFromAssistant(in INotificationListener token, String key); |
Julia Reynolds | 0d07378 | 2020-02-13 16:07:52 -0500 | [diff] [blame] | 166 | void unsnoozeNotificationFromSystemListener(in INotificationListener token, String key); |
Chris Wren | 51017d0 | 2015-12-15 15:34:46 -0500 | [diff] [blame] | 167 | |
John Spurlock | b478252 | 2014-08-22 14:54:46 -0400 | [diff] [blame] | 168 | ComponentName getEffectsSuppressor(); |
John Spurlock | 2b122f4 | 2014-08-27 16:29:47 -0400 | [diff] [blame] | 169 | boolean matchesCallFilter(in Bundle extras); |
John Spurlock | 530052a | 2014-11-30 16:26:19 -0500 | [diff] [blame] | 170 | boolean isSystemConditionProviderEnabled(String path); |
John Spurlock | b478252 | 2014-08-22 14:54:46 -0400 | [diff] [blame] | 171 | |
Julia Reynolds | b852e56 | 2017-06-06 16:14:18 -0400 | [diff] [blame] | 172 | boolean isNotificationListenerAccessGranted(in ComponentName listener); |
| 173 | boolean isNotificationListenerAccessGrantedForUser(in ComponentName listener, int userId); |
| 174 | boolean isNotificationAssistantAccessGranted(in ComponentName assistant); |
| 175 | void setNotificationListenerAccessGranted(in ComponentName listener, boolean enabled); |
| 176 | void setNotificationAssistantAccessGranted(in ComponentName assistant, boolean enabled); |
| 177 | void setNotificationListenerAccessGrantedForUser(in ComponentName listener, int userId, boolean enabled); |
| 178 | void setNotificationAssistantAccessGrantedForUser(in ComponentName assistant, int userId, boolean enabled); |
| 179 | List<String> getEnabledNotificationListenerPackages(); |
| 180 | List<ComponentName> getEnabledNotificationListeners(int userId); |
Fabian Kozynski | d942566 | 2019-01-29 13:08:30 -0500 | [diff] [blame] | 181 | ComponentName getAllowedNotificationAssistantForUser(int userId); |
| 182 | ComponentName getAllowedNotificationAssistant(); |
Julia Reynolds | b852e56 | 2017-06-06 16:14:18 -0400 | [diff] [blame] | 183 | |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 184 | @UnsupportedAppUsage |
John Spurlock | b2278d6 | 2015-04-07 12:47:12 -0400 | [diff] [blame] | 185 | int getZenMode(); |
Andrei Onea | 4b2116c | 2019-02-28 15:13:42 +0000 | [diff] [blame] | 186 | @UnsupportedAppUsage |
John Spurlock | 056c519 | 2014-04-20 21:52:01 -0400 | [diff] [blame] | 187 | ZenModeConfig getZenModeConfig(); |
Beverly | ff2df9b | 2018-10-10 16:54:10 -0400 | [diff] [blame] | 188 | NotificationManager.Policy getConsolidatedNotificationPolicy(); |
John Spurlock | b2278d6 | 2015-04-07 12:47:12 -0400 | [diff] [blame] | 189 | oneway void setZenMode(int mode, in Uri conditionId, String reason); |
John Spurlock | e77bb36 | 2014-04-26 10:24:59 -0400 | [diff] [blame] | 190 | oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions); |
John Spurlock | 8077493 | 2015-05-07 17:38:50 -0400 | [diff] [blame] | 191 | boolean isNotificationPolicyAccessGranted(String pkg); |
| 192 | NotificationManager.Policy getNotificationPolicy(String pkg); |
| 193 | void setNotificationPolicy(String pkg, in NotificationManager.Policy policy); |
John Spurlock | 8077493 | 2015-05-07 17:38:50 -0400 | [diff] [blame] | 194 | boolean isNotificationPolicyAccessGrantedForPackage(String pkg); |
| 195 | void setNotificationPolicyAccessGranted(String pkg, boolean granted); |
Julia Reynolds | 92febc3 | 2017-10-26 11:30:31 -0400 | [diff] [blame] | 196 | void setNotificationPolicyAccessGrantedForUser(String pkg, int userId, boolean granted); |
Julia Reynolds | 4fe98d6 | 2015-10-06 16:23:41 -0400 | [diff] [blame] | 197 | AutomaticZenRule getAutomaticZenRule(String id); |
Julia Reynolds | 361e82d3 | 2016-02-26 18:19:49 -0500 | [diff] [blame] | 198 | List<ZenModeConfig.ZenRule> getZenRules(); |
| 199 | String addAutomaticZenRule(in AutomaticZenRule automaticZenRule); |
| 200 | boolean updateAutomaticZenRule(String id, in AutomaticZenRule automaticZenRule); |
Julia Reynolds | 4fe98d6 | 2015-10-06 16:23:41 -0400 | [diff] [blame] | 201 | boolean removeAutomaticZenRule(String id); |
Julia Reynolds | c8e54e8 | 2015-11-30 16:43:05 -0500 | [diff] [blame] | 202 | boolean removeAutomaticZenRules(String packageName); |
Julia Reynolds | 43b70cd | 2016-01-14 15:05:34 -0500 | [diff] [blame] | 203 | int getRuleInstanceCount(in ComponentName owner); |
Julia Reynolds | 6806207 | 2018-08-06 15:38:21 -0400 | [diff] [blame] | 204 | void setAutomaticZenRuleState(String id, in Condition condition); |
Christopher Tate | f9767d6 | 2015-04-08 14:35:43 -0700 | [diff] [blame] | 205 | |
| 206 | byte[] getBackupPayload(int user); |
| 207 | void applyRestore(in byte[] payload, int user); |
Dan Sandler | 994349c | 2015-04-15 11:02:54 -0400 | [diff] [blame] | 208 | |
| 209 | ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); |
Julia Reynolds | a7ba45a | 2018-08-29 09:07:52 -0400 | [diff] [blame] | 210 | |
| 211 | void setNotificationDelegate(String callingPkg, String delegate); |
Julia Reynolds | a7ba45a | 2018-08-29 09:07:52 -0400 | [diff] [blame] | 212 | String getNotificationDelegate(String callingPkg); |
Julia Reynolds | 7a6d07a | 2019-03-18 11:31:56 -0400 | [diff] [blame] | 213 | boolean canNotifyAsPackage(String callingPkg, String targetPkg, int userId); |
Zimuzo | b3b9c26 | 2018-10-31 11:54:20 +0000 | [diff] [blame] | 214 | |
| 215 | void setPrivateNotificationsAllowed(boolean allow); |
| 216 | boolean getPrivateNotificationsAllowed(); |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 217 | |
| 218 | long pullStats(long startNs, int report, boolean doAgg, out List<ParcelFileDescriptor> stats); |
Dan Sandler | ea75fdd | 2014-08-12 12:29:19 -0400 | [diff] [blame] | 219 | } |