INotificationManager.aidl revision d8afe3c41e65a8f6ff4283c124ba250c92cf50c6
19066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/* //device/java/android/android/app/INotificationManager.aidl
29066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
39066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** Copyright 2007, The Android Open Source Project
49066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
59066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** Licensed under the Apache License, Version 2.0 (the "License");
69066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** you may not use this file except in compliance with the License.
79066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** You may obtain a copy of the License at
89066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
99066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**     http://www.apache.org/licenses/LICENSE-2.0
109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** Unless required by applicable law or agreed to in writing, software
129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** distributed under the License is distributed on an "AS IS" BASIS,
139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** See the License for the specific language governing permissions and
159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** limitations under the License.
169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project*/
179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpackage android.app;
199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.app.ITransientNotification;
219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.app.Notification;
225feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandlerimport android.content.ComponentName;
239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.content.Intent;
24cee44ba418bef83571349acb2d24ef29833502e0Christoph Studerimport android.content.pm.ParceledListSlice;
25e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlockimport android.net.Uri;
267340fc8665ae3f9f1978f42aa0e5e1da85036158John Spurlockimport android.service.notification.Condition;
27e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlockimport android.service.notification.IConditionListener;
287340fc8665ae3f9f1978f42aa0e5e1da85036158John Spurlockimport android.service.notification.IConditionProvider;
295feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandlerimport android.service.notification.INotificationListener;
30e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlockimport android.service.notification.StatusBarNotification;
31056c519df1dfb8fdc57daddfdf09bc0e1ffddac4John Spurlockimport android.service.notification.ZenModeConfig;
32fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler
339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** {@hide} */
349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectinterface INotificationManager
359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project{
364120375d46091df8527bb701882e056fbb0e6b06Dianne Hackborn    void cancelAllNotifications(String pkg, int userId);
379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void enqueueToast(String pkg, ITransientNotification callback, int duration);
399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void cancelToast(String pkg, ITransientNotification callback);
408fd7f1ed7c11d35b3f2a97878e68ee38a551dd15Christoph Studer    void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id,
414120375d46091df8527bb701882e056fbb0e6b06Dianne Hackborn            in Notification notification, inout int[] idReceived, int userId);
424120375d46091df8527bb701882e056fbb0e6b06Dianne Hackborn    void cancelNotificationWithTag(String pkg, String tag, int id, int userId);
430da673f02e542c644c300568807c80e196296860Daniel Sandler
444a900acdef4559f9f84ca7e2bce45485215fc130Daniel Sandler    void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled);
454a900acdef4559f9f84ca7e2bce45485215fc130Daniel Sandler    boolean areNotificationsEnabledForPackage(String pkg, int uid);
46fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler
4754bbef435ed857fc68941672799fc8001c101119Chris Wren    void setPackagePriority(String pkg, int uid, int priority);
4854bbef435ed857fc68941672799fc8001c101119Chris Wren    int getPackagePriority(String pkg, int uid);
4954bbef435ed857fc68941672799fc8001c101119Chris Wren
50cee44ba418bef83571349acb2d24ef29833502e0Christoph Studer    // TODO: Remove this when callers have been migrated to the equivalent
51cee44ba418bef83571349acb2d24ef29833502e0Christoph Studer    // INotificationListener method.
52fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler    StatusBarNotification[] getActiveNotifications(String callingPkg);
5378d0d25dca42fcde5dcea98ab74bfc7f5c8e1114Daniel Sandler    StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count);
5409a247e9a86df068422cbe8b60430fb6583c028cDaniel Sandler
555feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler    void registerListener(in INotificationListener listener, in ComponentName component, int userid);
5609a247e9a86df068422cbe8b60430fb6583c028cDaniel Sandler    void unregisterListener(in INotificationListener listener, int userid);
579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
58e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler    void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id);
59a4294297d46cc0b9f45897bc688c267502cce3efJohn Spurlock    void cancelNotificationsFromListener(in INotificationListener token, in String[] keys);
6025cf8cee6f304a286d321204e448b18ce733a60cDaniel Sandler
61cee44ba418bef83571349acb2d24ef29833502e0Christoph Studer    ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token);
62d8afe3c41e65a8f6ff4283c124ba250c92cf50c6John Spurlock    void requestHintsFromListener(in INotificationListener token, int hints);
63d8afe3c41e65a8f6ff4283c124ba250c92cf50c6John Spurlock    int getHintsFromListener(in INotificationListener token);
64056c519df1dfb8fdc57daddfdf09bc0e1ffddac4John Spurlock
65056c519df1dfb8fdc57daddfdf09bc0e1ffddac4John Spurlock    ZenModeConfig getZenModeConfig();
66056c519df1dfb8fdc57daddfdf09bc0e1ffddac4John Spurlock    boolean setZenModeConfig(in ZenModeConfig config);
67e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlock    oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions);
683b98b3f1f85aff0c84ebef4dd497c146d1b4d248John Spurlock    oneway void requestZenModeConditions(in IConditionListener callback, int relevance);
69e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlock    oneway void setZenModeCondition(in Uri conditionId);
703b98b3f1f85aff0c84ebef4dd497c146d1b4d248John Spurlock    oneway void setAutomaticZenModeConditions(in Uri[] conditionIds);
713b98b3f1f85aff0c84ebef4dd497c146d1b4d248John Spurlock    Condition[] getAutomaticZenModeConditions();
725feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler}