INotificationManager.aidl revision 0efdb88ccc9d650e7a644b9be8f63792f2c66841
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 18package android.app; 19 20import android.app.ITransientNotification; 21import android.app.Notification; 22import android.app.NotificationManager; 23import android.content.ComponentName; 24import android.content.Intent; 25import android.content.pm.ParceledListSlice; 26import android.net.Uri; 27import android.os.Bundle; 28import android.service.notification.Condition; 29import android.service.notification.IConditionListener; 30import android.service.notification.IConditionProvider; 31import android.service.notification.INotificationListener; 32import android.service.notification.StatusBarNotification; 33import android.app.AutomaticZenRule; 34import android.service.notification.ZenModeConfig; 35 36/** {@hide} */ 37interface INotificationManager 38{ 39 void cancelAllNotifications(String pkg, int userId); 40 41 void enqueueToast(String pkg, ITransientNotification callback, int duration); 42 void cancelToast(String pkg, ITransientNotification callback); 43 void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id, 44 in Notification notification, inout int[] idReceived, int userId); 45 void cancelNotificationWithTag(String pkg, String tag, int id, int userId); 46 47 void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); 48 boolean areNotificationsEnabledForPackage(String pkg, int uid); 49 boolean areNotificationsEnabled(String pkg); 50 51 void setVisibilityOverride(String pkg, int uid, int visibility); 52 int getVisibilityOverride(String pkg, int uid); 53 void setPriority(String pkg, int uid, int priority); 54 int getPriority(String pkg, int uid); 55 void setImportance(String pkg, int uid, int importance); 56 int getImportance(String pkg, int uid); 57 int getPackageImportance(String pkg); 58 59 // TODO: Remove this when callers have been migrated to the equivalent 60 // INotificationListener method. 61 StatusBarNotification[] getActiveNotifications(String callingPkg); 62 StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count); 63 64 void registerListener(in INotificationListener listener, in ComponentName component, int userid); 65 void unregisterListener(in INotificationListener listener, int userid); 66 67 void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id); 68 void cancelNotificationsFromListener(in INotificationListener token, in String[] keys); 69 70 void requestBindListener(in ComponentName component); 71 void requestUnbindListener(in INotificationListener token); 72 73 void setNotificationsShownFromListener(in INotificationListener token, in String[] keys); 74 75 ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token, in String[] keys, int trim); 76 void requestHintsFromListener(in INotificationListener token, int hints); 77 int getHintsFromListener(in INotificationListener token); 78 void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter); 79 int getInterruptionFilterFromListener(in INotificationListener token); 80 void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim); 81 void setInterruptionFilter(String pkg, int interruptionFilter); 82 83 void setImportanceFromRankerService(in INotificationListener token, String key, int importance, CharSequence explanation); 84 85 ComponentName getEffectsSuppressor(); 86 boolean matchesCallFilter(in Bundle extras); 87 boolean isSystemConditionProviderEnabled(String path); 88 89 int getZenMode(); 90 ZenModeConfig getZenModeConfig(); 91 oneway void setZenMode(int mode, in Uri conditionId, String reason); 92 oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions); 93 boolean isNotificationPolicyAccessGranted(String pkg); 94 NotificationManager.Policy getNotificationPolicy(String pkg); 95 void setNotificationPolicy(String pkg, in NotificationManager.Policy policy); 96 String[] getPackagesRequestingNotificationPolicyAccess(); 97 boolean isNotificationPolicyAccessGrantedForPackage(String pkg); 98 void setNotificationPolicyAccessGranted(String pkg, boolean granted); 99 AutomaticZenRule getAutomaticZenRule(String id); 100 List<ZenModeConfig.ZenRule> getZenRules(); 101 String addAutomaticZenRule(in AutomaticZenRule automaticZenRule); 102 boolean updateAutomaticZenRule(String id, in AutomaticZenRule automaticZenRule); 103 boolean removeAutomaticZenRule(String id); 104 boolean removeAutomaticZenRules(String packageName); 105 int getRuleInstanceCount(in ComponentName owner); 106 107 byte[] getBackupPayload(int user); 108 void applyRestore(in byte[] payload, int user); 109 110 ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); 111} 112