1 /* //device/java/android/android/app/INotificationManager.aidl 2 ** 3 ** Copyright 2007, The Android Open Source Project 4 ** 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 8 ** 9 ** http://www.apache.org/licenses/LICENSE-2.0 10 ** 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 15 ** limitations under the License. 16 */ 17 18 package android.app; 19 20 import android.app.ITransientNotification; 21 import android.app.Notification; 22 import android.app.NotificationManager; 23 import android.content.ComponentName; 24 import android.content.Intent; 25 import android.content.pm.ParceledListSlice; 26 import android.net.Uri; 27 import android.os.Bundle; 28 import android.service.notification.Condition; 29 import android.service.notification.IConditionListener; 30 import android.service.notification.IConditionProvider; 31 import android.service.notification.INotificationListener; 32 import android.service.notification.StatusBarNotification; 33 import android.service.notification.ZenModeConfig; 34 35 /** {@hide} */ 36 interface INotificationManager 37 { cancelAllNotifications(String pkg, int userId)38 void cancelAllNotifications(String pkg, int userId); 39 enqueueToast(String pkg, ITransientNotification callback, int duration)40 void enqueueToast(String pkg, ITransientNotification callback, int duration); cancelToast(String pkg, ITransientNotification callback)41 void cancelToast(String pkg, ITransientNotification callback); enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id, in Notification notification, inout int[] idReceived, int userId)42 void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id, 43 in Notification notification, inout int[] idReceived, int userId); cancelNotificationWithTag(String pkg, String tag, int id, int userId)44 void cancelNotificationWithTag(String pkg, String tag, int id, int userId); 45 setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled)46 void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); areNotificationsEnabledForPackage(String pkg, int uid)47 boolean areNotificationsEnabledForPackage(String pkg, int uid); 48 setPackagePriority(String pkg, int uid, int priority)49 void setPackagePriority(String pkg, int uid, int priority); getPackagePriority(String pkg, int uid)50 int getPackagePriority(String pkg, int uid); 51 setPackagePeekable(String pkg, int uid, boolean peekable)52 void setPackagePeekable(String pkg, int uid, boolean peekable); getPackagePeekable(String pkg, int uid)53 boolean getPackagePeekable(String pkg, int uid); 54 setPackageVisibilityOverride(String pkg, int uid, int visibility)55 void setPackageVisibilityOverride(String pkg, int uid, int visibility); getPackageVisibilityOverride(String pkg, int uid)56 int getPackageVisibilityOverride(String pkg, int uid); 57 58 // TODO: Remove this when callers have been migrated to the equivalent 59 // INotificationListener method. getActiveNotifications(String callingPkg)60 StatusBarNotification[] getActiveNotifications(String callingPkg); getHistoricalNotifications(String callingPkg, int count)61 StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count); 62 registerListener(in INotificationListener listener, in ComponentName component, int userid)63 void registerListener(in INotificationListener listener, in ComponentName component, int userid); unregisterListener(in INotificationListener listener, int userid)64 void unregisterListener(in INotificationListener listener, int userid); 65 cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id)66 void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id); cancelNotificationsFromListener(in INotificationListener token, in String[] keys)67 void cancelNotificationsFromListener(in INotificationListener token, in String[] keys); 68 setNotificationsShownFromListener(in INotificationListener token, in String[] keys)69 void setNotificationsShownFromListener(in INotificationListener token, in String[] keys); 70 getActiveNotificationsFromListener(in INotificationListener token, in String[] keys, int trim)71 ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token, in String[] keys, int trim); requestHintsFromListener(in INotificationListener token, int hints)72 void requestHintsFromListener(in INotificationListener token, int hints); getHintsFromListener(in INotificationListener token)73 int getHintsFromListener(in INotificationListener token); requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter)74 void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter); getInterruptionFilterFromListener(in INotificationListener token)75 int getInterruptionFilterFromListener(in INotificationListener token); setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim)76 void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim); setInterruptionFilter(String pkg, int interruptionFilter)77 void setInterruptionFilter(String pkg, int interruptionFilter); 78 getEffectsSuppressor()79 ComponentName getEffectsSuppressor(); matchesCallFilter(in Bundle extras)80 boolean matchesCallFilter(in Bundle extras); isSystemConditionProviderEnabled(String path)81 boolean isSystemConditionProviderEnabled(String path); 82 getZenMode()83 int getZenMode(); getZenModeConfig()84 ZenModeConfig getZenModeConfig(); setZenModeConfig(in ZenModeConfig config, String reason)85 boolean setZenModeConfig(in ZenModeConfig config, String reason); setZenMode(int mode, in Uri conditionId, String reason)86 oneway void setZenMode(int mode, in Uri conditionId, String reason); notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions)87 oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions); requestZenModeConditions(in IConditionListener callback, int relevance)88 oneway void requestZenModeConditions(in IConditionListener callback, int relevance); isNotificationPolicyAccessGranted(String pkg)89 boolean isNotificationPolicyAccessGranted(String pkg); getNotificationPolicy(String pkg)90 NotificationManager.Policy getNotificationPolicy(String pkg); setNotificationPolicy(String pkg, in NotificationManager.Policy policy)91 void setNotificationPolicy(String pkg, in NotificationManager.Policy policy); getPackagesRequestingNotificationPolicyAccess()92 String[] getPackagesRequestingNotificationPolicyAccess(); isNotificationPolicyAccessGrantedForPackage(String pkg)93 boolean isNotificationPolicyAccessGrantedForPackage(String pkg); setNotificationPolicyAccessGranted(String pkg, boolean granted)94 void setNotificationPolicyAccessGranted(String pkg, boolean granted); 95 getBackupPayload(int user)96 byte[] getBackupPayload(int user); applyRestore(in byte[] payload, int user)97 void applyRestore(in byte[] payload, int user); 98 getAppActiveNotifications(String callingPkg, int userId)99 ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); 100 } 101