diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl index 4c3e888157ee8..0deef53c478fb 100644 --- a/core/java/android/app/INotificationManager.aidl +++ b/core/java/android/app/INotificationManager.aidl @@ -58,6 +58,7 @@ interface INotificationManager void setShowBadge(String pkg, int uid, boolean showBadge); boolean canShowBadge(String pkg, int uid); + boolean hasSentValidMsg(String pkg, int uid); boolean isInInvalidMsgState(String pkg, int uid); boolean hasUserDemotedInvalidMsgApp(String pkg, int uid); void setInvalidMsgAppDemoted(String pkg, int uid, boolean isDemoted); diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 86d2e63975dbe..6ae58ec7feeaa 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -3171,6 +3171,12 @@ public class NotificationManagerService extends SystemService { handleSavePolicyFile(); } + @Override + public boolean hasSentValidMsg(String pkg, int uid) { + checkCallerIsSystem(); + return mPreferencesHelper.hasSentValidMsg(pkg, uid); + } + @Override public boolean isInInvalidMsgState(String pkg, int uid) { checkCallerIsSystem();