Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5225,6 +5225,7 @@ package android.app { public class NotificationManager { method public android.app.AutomaticZenRule addAutomaticZenRule(android.app.AutomaticZenRule); method public boolean areNotificationsEnabled(); method public void cancel(int); method public void cancel(java.lang.String, int); method public void cancelAll(); Loading @@ -5232,6 +5233,7 @@ package android.app { method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String); method public java.util.List<android.app.AutomaticZenRule> getAutomaticZenRules(); method public final int getCurrentInterruptionFilter(); method public int getImportance(java.lang.String); method public android.app.NotificationManager.Policy getNotificationPolicy(); method public boolean isNotificationPolicyAccessGranted(); method public void notify(int, android.app.Notification); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5357,6 +5357,7 @@ package android.app { public class NotificationManager { method public android.app.AutomaticZenRule addAutomaticZenRule(android.app.AutomaticZenRule); method public boolean areNotificationsEnabled(); method public void cancel(int); method public void cancel(java.lang.String, int); method public void cancelAll(); Loading @@ -5364,6 +5365,7 @@ package android.app { method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String); method public java.util.List<android.app.AutomaticZenRule> getAutomaticZenRules(); method public final int getCurrentInterruptionFilter(); method public int getImportance(java.lang.String); method public android.app.NotificationManager.Policy getNotificationPolicy(); method public boolean isNotificationPolicyAccessGranted(); method public void notify(int, android.app.Notification); api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5225,6 +5225,7 @@ package android.app { public class NotificationManager { method public android.app.AutomaticZenRule addAutomaticZenRule(android.app.AutomaticZenRule); method public boolean areNotificationsEnabled(); method public void cancel(int); method public void cancel(java.lang.String, int); method public void cancelAll(); Loading @@ -5232,6 +5233,7 @@ package android.app { method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String); method public java.util.List<android.app.AutomaticZenRule> getAutomaticZenRules(); method public final int getCurrentInterruptionFilter(); method public int getImportance(java.lang.String); method public android.app.NotificationManager.Policy getNotificationPolicy(); method public boolean isNotificationPolicyAccessGranted(); method public void notify(int, android.app.Notification); core/java/android/app/INotificationManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ interface INotificationManager void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); boolean areNotificationsEnabledForPackage(String pkg, int uid); boolean areNotificationsEnabled(String pkg); ParceledListSlice getTopics(String pkg, int uid); void setVisibilityOverride(String pkg, int uid, in Notification.Topic topic, int visibility); Loading @@ -54,6 +55,7 @@ interface INotificationManager int getPriority(String pkg, int uid, in Notification.Topic topic); void setImportance(String pkg, int uid, in Notification.Topic topic, int importance); int getImportance(String pkg, int uid, in Notification.Topic topic); int getTopicImportance(String pkg, String topicId); boolean doesAppUseTopics(String pkg, int uid); boolean hasBannedTopics(String pkg, int uid); Loading core/java/android/app/NotificationManager.java +22 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.app; import com.android.internal.util.Preconditions; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; Loading @@ -37,6 +39,7 @@ import android.os.StrictMode; import android.os.UserHandle; import android.provider.Settings.Global; import android.service.notification.IConditionListener; import android.service.notification.NotificationListenerService; import android.service.notification.StatusBarNotification; import android.service.notification.ZenModeConfig; import android.util.ArraySet; Loading Loading @@ -503,6 +506,25 @@ public class NotificationManager return false; } public int getImportance(String topicId) { Preconditions.checkNotNull(topicId); INotificationManager service = getService(); try { return service.getTopicImportance(mContext.getPackageName(), topicId); } catch (RemoteException e) { } return NotificationListenerService.Ranking.IMPORTANCE_UNSPECIFIED; } public boolean areNotificationsEnabled() { INotificationManager service = getService(); try { return service.areNotificationsEnabled(mContext.getPackageName()); } catch (RemoteException e) { } return false; } /** * Checks the ability to read/modify notification policy for the calling package. * Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5225,6 +5225,7 @@ package android.app { public class NotificationManager { method public android.app.AutomaticZenRule addAutomaticZenRule(android.app.AutomaticZenRule); method public boolean areNotificationsEnabled(); method public void cancel(int); method public void cancel(java.lang.String, int); method public void cancelAll(); Loading @@ -5232,6 +5233,7 @@ package android.app { method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String); method public java.util.List<android.app.AutomaticZenRule> getAutomaticZenRules(); method public final int getCurrentInterruptionFilter(); method public int getImportance(java.lang.String); method public android.app.NotificationManager.Policy getNotificationPolicy(); method public boolean isNotificationPolicyAccessGranted(); method public void notify(int, android.app.Notification);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5357,6 +5357,7 @@ package android.app { public class NotificationManager { method public android.app.AutomaticZenRule addAutomaticZenRule(android.app.AutomaticZenRule); method public boolean areNotificationsEnabled(); method public void cancel(int); method public void cancel(java.lang.String, int); method public void cancelAll(); Loading @@ -5364,6 +5365,7 @@ package android.app { method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String); method public java.util.List<android.app.AutomaticZenRule> getAutomaticZenRules(); method public final int getCurrentInterruptionFilter(); method public int getImportance(java.lang.String); method public android.app.NotificationManager.Policy getNotificationPolicy(); method public boolean isNotificationPolicyAccessGranted(); method public void notify(int, android.app.Notification);
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5225,6 +5225,7 @@ package android.app { public class NotificationManager { method public android.app.AutomaticZenRule addAutomaticZenRule(android.app.AutomaticZenRule); method public boolean areNotificationsEnabled(); method public void cancel(int); method public void cancel(java.lang.String, int); method public void cancelAll(); Loading @@ -5232,6 +5233,7 @@ package android.app { method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String); method public java.util.List<android.app.AutomaticZenRule> getAutomaticZenRules(); method public final int getCurrentInterruptionFilter(); method public int getImportance(java.lang.String); method public android.app.NotificationManager.Policy getNotificationPolicy(); method public boolean isNotificationPolicyAccessGranted(); method public void notify(int, android.app.Notification);
core/java/android/app/INotificationManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ interface INotificationManager void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); boolean areNotificationsEnabledForPackage(String pkg, int uid); boolean areNotificationsEnabled(String pkg); ParceledListSlice getTopics(String pkg, int uid); void setVisibilityOverride(String pkg, int uid, in Notification.Topic topic, int visibility); Loading @@ -54,6 +55,7 @@ interface INotificationManager int getPriority(String pkg, int uid, in Notification.Topic topic); void setImportance(String pkg, int uid, in Notification.Topic topic, int importance); int getImportance(String pkg, int uid, in Notification.Topic topic); int getTopicImportance(String pkg, String topicId); boolean doesAppUseTopics(String pkg, int uid); boolean hasBannedTopics(String pkg, int uid); Loading
core/java/android/app/NotificationManager.java +22 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.app; import com.android.internal.util.Preconditions; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; Loading @@ -37,6 +39,7 @@ import android.os.StrictMode; import android.os.UserHandle; import android.provider.Settings.Global; import android.service.notification.IConditionListener; import android.service.notification.NotificationListenerService; import android.service.notification.StatusBarNotification; import android.service.notification.ZenModeConfig; import android.util.ArraySet; Loading Loading @@ -503,6 +506,25 @@ public class NotificationManager return false; } public int getImportance(String topicId) { Preconditions.checkNotNull(topicId); INotificationManager service = getService(); try { return service.getTopicImportance(mContext.getPackageName(), topicId); } catch (RemoteException e) { } return NotificationListenerService.Ranking.IMPORTANCE_UNSPECIFIED; } public boolean areNotificationsEnabled() { INotificationManager service = getService(); try { return service.areNotificationsEnabled(mContext.getPackageName()); } catch (RemoteException e) { } return false; } /** * Checks the ability to read/modify notification policy for the calling package. * Loading