INotificationManager.aidl revision f9767d680d63ac1771a17ccc5775cd337ff967b8
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.INotificationManagerCallback;
21import android.app.ITransientNotification;
22import android.app.Notification;
23import android.app.NotificationManager;
24import android.content.ComponentName;
25import android.content.Intent;
26import android.content.pm.ParceledListSlice;
27import android.net.Uri;
28import android.os.Bundle;
29import android.service.notification.Condition;
30import android.service.notification.IConditionListener;
31import android.service.notification.IConditionProvider;
32import android.service.notification.INotificationListener;
33import android.service.notification.StatusBarNotification;
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    void setPackagePriority(String pkg, int uid, int priority);
51    int getPackagePriority(String pkg, int uid);
52
53    void setPackagePeekable(String pkg, int uid, boolean peekable);
54    boolean getPackagePeekable(String pkg, int uid);
55
56    void setPackageVisibilityOverride(String pkg, int uid, int visibility);
57    int getPackageVisibilityOverride(String pkg, int uid);
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    ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token, in String[] keys, int trim);
71    void requestHintsFromListener(in INotificationListener token, int hints);
72    int getHintsFromListener(in INotificationListener token);
73    void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter);
74    int getInterruptionFilterFromListener(in INotificationListener token);
75    void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim);
76    NotificationManager.Policy.Token getPolicyTokenFromListener(in INotificationListener listener);
77
78    ComponentName getEffectsSuppressor();
79    boolean matchesCallFilter(in Bundle extras);
80    boolean isSystemConditionProviderEnabled(String path);
81
82    int getZenMode();
83    ZenModeConfig getZenModeConfig();
84    boolean setZenModeConfig(in ZenModeConfig config, String reason);
85    oneway void setZenMode(int mode, in Uri conditionId, String reason);
86    oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions);
87    oneway void requestZenModeConditions(in IConditionListener callback, int relevance);
88    oneway void requestNotificationPolicyToken(String pkg, in INotificationManagerCallback callback);
89    boolean isNotificationPolicyTokenValid(String pkg, in NotificationManager.Policy.Token token);
90    NotificationManager.Policy getNotificationPolicy(in NotificationManager.Policy.Token token);
91    void setNotificationPolicy(in NotificationManager.Policy.Token token, in NotificationManager.Policy policy);
92
93    byte[] getBackupPayload(int user);
94    void applyRestore(in byte[] payload, int user);
95}
96