INotificationManager.aidl revision 0efdb88ccc9d650e7a644b9be8f63792f2c66841
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; 221fc476d51203c0b76ebd0f2062adf3059437b0dcJohn Spurlockimport android.app.NotificationManager; 235feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandlerimport android.content.ComponentName; 249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.content.Intent; 25cee44ba418bef83571349acb2d24ef29833502e0Christoph Studerimport android.content.pm.ParceledListSlice; 26e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlockimport android.net.Uri; 272b122f4c2e691f0319e4f9ea5873989792bb56a6John Spurlockimport android.os.Bundle; 287340fc8665ae3f9f1978f42aa0e5e1da85036158John Spurlockimport android.service.notification.Condition; 29e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlockimport android.service.notification.IConditionListener; 307340fc8665ae3f9f1978f42aa0e5e1da85036158John Spurlockimport android.service.notification.IConditionProvider; 315feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandlerimport android.service.notification.INotificationListener; 32e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlockimport android.service.notification.StatusBarNotification; 33a47a27ffd92f172298c2728040e49d502a2d6c87Julia Reynoldsimport android.app.AutomaticZenRule; 34056c519df1dfb8fdc57daddfdf09bc0e1ffddac4John Spurlockimport android.service.notification.ZenModeConfig; 35fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler 369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** {@hide} */ 379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectinterface INotificationManager 389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project{ 394120375d46091df8527bb701882e056fbb0e6b06Dianne Hackborn void cancelAllNotifications(String pkg, int userId); 409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void enqueueToast(String pkg, ITransientNotification callback, int duration); 429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void cancelToast(String pkg, ITransientNotification callback); 438fd7f1ed7c11d35b3f2a97878e68ee38a551dd15Christoph Studer void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id, 444120375d46091df8527bb701882e056fbb0e6b06Dianne Hackborn in Notification notification, inout int[] idReceived, int userId); 454120375d46091df8527bb701882e056fbb0e6b06Dianne Hackborn void cancelNotificationWithTag(String pkg, String tag, int id, int userId); 460da673f02e542c644c300568807c80e196296860Daniel Sandler 474a900acdef4559f9f84ca7e2bce45485215fc130Daniel Sandler void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); 484a900acdef4559f9f84ca7e2bce45485215fc130Daniel Sandler boolean areNotificationsEnabledForPackage(String pkg, int uid); 4981afbcdbf96c687b61ed53170e1654f4f8ea5b15Julia Reynolds boolean areNotificationsEnabled(String pkg); 50fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler 51ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds void setVisibilityOverride(String pkg, int uid, int visibility); 52ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds int getVisibilityOverride(String pkg, int uid); 53ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds void setPriority(String pkg, int uid, int priority); 54ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds int getPriority(String pkg, int uid); 55ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds void setImportance(String pkg, int uid, int importance); 56ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds int getImportance(String pkg, int uid); 57ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds int getPackageImportance(String pkg); 583ad4e3a45bbe44129b14c4d391431e44f1e04f0cChris Wren 59cee44ba418bef83571349acb2d24ef29833502e0Christoph Studer // TODO: Remove this when callers have been migrated to the equivalent 60cee44ba418bef83571349acb2d24ef29833502e0Christoph Studer // INotificationListener method. 61fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler StatusBarNotification[] getActiveNotifications(String callingPkg); 6278d0d25dca42fcde5dcea98ab74bfc7f5c8e1114Daniel Sandler StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count); 6309a247e9a86df068422cbe8b60430fb6583c028cDaniel Sandler 640efdb88ccc9d650e7a644b9be8f63792f2c66841Chris Wren void registerListener(in INotificationListener listener, in ComponentName component, int userid); 6509a247e9a86df068422cbe8b60430fb6583c028cDaniel Sandler void unregisterListener(in INotificationListener listener, int userid); 669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 67e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler void cancelNotificationFromListener(in INotificationListener token, String pkg, String tag, int id); 68a4294297d46cc0b9f45897bc688c267502cce3efJohn Spurlock void cancelNotificationsFromListener(in INotificationListener token, in String[] keys); 6925cf8cee6f304a286d321204e448b18ce733a60cDaniel Sandler 70ab41eecf22352f54167ce9a272a397715ffd0015Chris Wren void requestBindListener(in ComponentName component); 71ab41eecf22352f54167ce9a272a397715ffd0015Chris Wren void requestUnbindListener(in INotificationListener token); 72ab41eecf22352f54167ce9a272a397715ffd0015Chris Wren 73f47e51ec605fccf7fed9e50d1adc98fbd4e8b340Amith Yamasani void setNotificationsShownFromListener(in INotificationListener token, in String[] keys); 74f47e51ec605fccf7fed9e50d1adc98fbd4e8b340Amith Yamasani 75b82bc785c966b59621a3a2523ba7cdf84a73697bChristoph Studer ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token, in String[] keys, int trim); 76d8afe3c41e65a8f6ff4283c124ba250c92cf50c6John Spurlock void requestHintsFromListener(in INotificationListener token, int hints); 77d8afe3c41e65a8f6ff4283c124ba250c92cf50c6John Spurlock int getHintsFromListener(in INotificationListener token); 7885a384b4256121eb85b7e72bcd50f3348f365d41Christoph Studer void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter); 7985a384b4256121eb85b7e72bcd50f3348f365d41Christoph Studer int getInterruptionFilterFromListener(in INotificationListener token); 80b82bc785c966b59621a3a2523ba7cdf84a73697bChristoph Studer void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim); 81807749301fcbda892dfc8a5832b19acf7d1cf53bJohn Spurlock void setInterruptionFilter(String pkg, int interruptionFilter); 82056c519df1dfb8fdc57daddfdf09bc0e1ffddac4John Spurlock 83e0ba7eb365ac19fdc11c3f820349f0352761b9f4Chris Wren void setImportanceFromRankerService(in INotificationListener token, String key, int importance, CharSequence explanation); 8451017d0e23ce9855fabcf786a2067ceb19121fbcChris Wren 85b4782526f5600d9759baac64b23e0c0cd05e2050John Spurlock ComponentName getEffectsSuppressor(); 862b122f4c2e691f0319e4f9ea5873989792bb56a6John Spurlock boolean matchesCallFilter(in Bundle extras); 87530052a2fe3b6a6a4246ce28ab0ced647fe7f470John Spurlock boolean isSystemConditionProviderEnabled(String path); 88b4782526f5600d9759baac64b23e0c0cd05e2050John Spurlock 89b2278d65714c0dd0a6f94d1913db1ebc8bfc8b06John Spurlock int getZenMode(); 90056c519df1dfb8fdc57daddfdf09bc0e1ffddac4John Spurlock ZenModeConfig getZenModeConfig(); 91b2278d65714c0dd0a6f94d1913db1ebc8bfc8b06John Spurlock oneway void setZenMode(int mode, in Uri conditionId, String reason); 92e77bb36d48b6b8b5c3bb6a1195aca469bb237919John Spurlock oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions); 93807749301fcbda892dfc8a5832b19acf7d1cf53bJohn Spurlock boolean isNotificationPolicyAccessGranted(String pkg); 94807749301fcbda892dfc8a5832b19acf7d1cf53bJohn Spurlock NotificationManager.Policy getNotificationPolicy(String pkg); 95807749301fcbda892dfc8a5832b19acf7d1cf53bJohn Spurlock void setNotificationPolicy(String pkg, in NotificationManager.Policy policy); 96807749301fcbda892dfc8a5832b19acf7d1cf53bJohn Spurlock String[] getPackagesRequestingNotificationPolicyAccess(); 97807749301fcbda892dfc8a5832b19acf7d1cf53bJohn Spurlock boolean isNotificationPolicyAccessGrantedForPackage(String pkg); 98807749301fcbda892dfc8a5832b19acf7d1cf53bJohn Spurlock void setNotificationPolicyAccessGranted(String pkg, boolean granted); 994fe98d6d4cc4898809b81d001f6b8a1b71b08f3aJulia Reynolds AutomaticZenRule getAutomaticZenRule(String id); 100361e82d399d33e0c45e9a002f2e519f1457a84adJulia Reynolds List<ZenModeConfig.ZenRule> getZenRules(); 101361e82d399d33e0c45e9a002f2e519f1457a84adJulia Reynolds String addAutomaticZenRule(in AutomaticZenRule automaticZenRule); 102361e82d399d33e0c45e9a002f2e519f1457a84adJulia Reynolds boolean updateAutomaticZenRule(String id, in AutomaticZenRule automaticZenRule); 1034fe98d6d4cc4898809b81d001f6b8a1b71b08f3aJulia Reynolds boolean removeAutomaticZenRule(String id); 104c8e54e8d5ec038ee6f520ee95948e2ef20490e97Julia Reynolds boolean removeAutomaticZenRules(String packageName); 10543b70cdc395d3a6cf3bd0a78b686a7f5d3ed86e0Julia Reynolds int getRuleInstanceCount(in ComponentName owner); 106f9767d680d63ac1771a17ccc5775cd337ff967b8Christopher Tate 107f9767d680d63ac1771a17ccc5775cd337ff967b8Christopher Tate byte[] getBackupPayload(int user); 108f9767d680d63ac1771a17ccc5775cd337ff967b8Christopher Tate void applyRestore(in byte[] payload, int user); 109994349c61e8697e626a7cd2b241a16b2b7669305Dan Sandler 110994349c61e8697e626a7cd2b241a16b2b7669305Dan Sandler ParceledListSlice getAppActiveNotifications(String callingPkg, int userId); 111ea75fddbb452638f286c2fcdbddff145ee1a85cbDan Sandler} 112