INotificationManager.aidl revision 5d25ee7a006fda7150ba251cff92c27130611f88
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 50 ParceledListSlice getTopics(String pkg, int uid); 51 void setTopicVisibilityOverride(String pkg, int uid, in Notification.Topic topic, int visibility); 52 int getTopicVisibilityOverride(String pkg, int uid, in Notification.Topic topic); 53 void setTopicPriority(String pkg, int uid, in Notification.Topic topic, int priority); 54 int getTopicPriority(String pkg, int uid, in Notification.Topic topic); 55 void setTopicImportance(String pkg, int uid, in Notification.Topic topic, int importance); 56 int getTopicImportance(String pkg, int uid, in Notification.Topic topic); 57 58 // TODO: Remove this when callers have been migrated to the equivalent 59 // INotificationListener method. 60 StatusBarNotification[] getActiveNotifications(String callingPkg); 61 StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count); 62 63 void registerListener(in INotificationListener listener, in ComponentName component, int userid); 64 void unregisterListener(in INotificationListener listener, int userid); 65 66 void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id); 67 void cancelNotificationsFromListener(in INotificationListener token, in String[] keys); 68 69 void setNotificationsShownFromListener(in INotificationListener token, in String[] keys); 70 71 ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token, in String[] keys, int trim); 72 void requestHintsFromListener(in INotificationListener token, int hints); 73 int getHintsFromListener(in INotificationListener token); 74 void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter); 75 int getInterruptionFilterFromListener(in INotificationListener token); 76 void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim); 77 void setInterruptionFilter(String pkg, int interruptionFilter); 78 79 ComponentName getEffectsSuppressor(); 80 boolean matchesCallFilter(in Bundle extras); 81 boolean isSystemConditionProviderEnabled(String path); 82 83 int getZenMode(); 84 ZenModeConfig getZenModeConfig(); 85 oneway void setZenMode(int mode, in Uri conditionId, String reason); 86 oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions); 87 boolean isNotificationPolicyAccessGranted(String pkg); 88 NotificationManager.Policy getNotificationPolicy(String pkg); 89 void setNotificationPolicy(String pkg, in NotificationManager.Policy policy); 90 String[] getPackagesRequestingNotificationPolicyAccess(); 91 boolean isNotificationPolicyAccessGrantedForPackage(String pkg); 92 void setNotificationPolicyAccessGranted(String pkg, boolean granted); 93 AutomaticZenRule getAutomaticZenRule(String id); 94 List<AutomaticZenRule> getAutomaticZenRules(); 95 AutomaticZenRule addAutomaticZenRule(in AutomaticZenRule automaticZenRule); 96 boolean updateAutomaticZenRule(in AutomaticZenRule automaticZenRule); 97 boolean removeAutomaticZenRule(String id); 98 boolean removeAutomaticZenRules(String packageName); 99 100 byte[] getBackupPayload(int user); 101 void applyRestore(in byte[] payload, int user); 102 103 ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); 104} 105