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