Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5995,7 +5995,7 @@ package android.app { method public android.service.notification.StatusBarNotification[] getActiveNotifications(); method public android.app.AutomaticZenRule getAutomaticZenRule(String); method public java.util.Map<java.lang.String,android.app.AutomaticZenRule> getAutomaticZenRules(); method @Nullable public android.app.NotificationManager.Policy getConsolidatedNotificationPolicy(); method @NonNull public android.app.NotificationManager.Policy getConsolidatedNotificationPolicy(); method public final int getCurrentInterruptionFilter(); method public int getImportance(); method public android.app.NotificationChannel getNotificationChannel(String); core/java/android/app/NotificationManager.java +6 −5 Original line number Diff line number Diff line Loading @@ -1015,14 +1015,15 @@ public class NotificationManager { } /** * Returns the currently applied notification policy. * * <p> * Gets the currently applied notification policy. If {@link #getCurrentInterruptionFilter} * is equal to {@link #INTERRUPTION_FILTER_ALL}, then the consolidated notification policy * will match the default notification policy returned by {@link #getNotificationPolicy}. * If {@link #getCurrentInterruptionFilter} is equal to {@link #INTERRUPTION_FILTER_ALL}, * then the consolidated notification policy will match the default notification policy * returned by {@link #getNotificationPolicy}. * </p> */ @Nullable public NotificationManager.Policy getConsolidatedNotificationPolicy() { public @NonNull NotificationManager.Policy getConsolidatedNotificationPolicy() { INotificationManager service = getService(); try { return service.getConsolidatedNotificationPolicy(); Loading services/core/java/com/android/server/notification/ZenModeHelper.java +1 −3 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ public class ZenModeHelper { updateDefaultAutomaticRuleNames(); mConfig = mDefaultConfig.copy(); mConfigs.put(UserHandle.USER_SYSTEM, mConfig); mConsolidatedPolicy = mConfig.toNotificationPolicy(); mSettingsObserver = new SettingsObserver(mHandler); mSettingsObserver.observe(); Loading Loading @@ -821,9 +822,6 @@ public class ZenModeHelper { * @return a copy of the zen mode consolidated policy */ public Policy getConsolidatedNotificationPolicy() { if (mConsolidatedPolicy == null) { return null; } return mConsolidatedPolicy.copy(); } Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5995,7 +5995,7 @@ package android.app { method public android.service.notification.StatusBarNotification[] getActiveNotifications(); method public android.app.AutomaticZenRule getAutomaticZenRule(String); method public java.util.Map<java.lang.String,android.app.AutomaticZenRule> getAutomaticZenRules(); method @Nullable public android.app.NotificationManager.Policy getConsolidatedNotificationPolicy(); method @NonNull public android.app.NotificationManager.Policy getConsolidatedNotificationPolicy(); method public final int getCurrentInterruptionFilter(); method public int getImportance(); method public android.app.NotificationChannel getNotificationChannel(String);
core/java/android/app/NotificationManager.java +6 −5 Original line number Diff line number Diff line Loading @@ -1015,14 +1015,15 @@ public class NotificationManager { } /** * Returns the currently applied notification policy. * * <p> * Gets the currently applied notification policy. If {@link #getCurrentInterruptionFilter} * is equal to {@link #INTERRUPTION_FILTER_ALL}, then the consolidated notification policy * will match the default notification policy returned by {@link #getNotificationPolicy}. * If {@link #getCurrentInterruptionFilter} is equal to {@link #INTERRUPTION_FILTER_ALL}, * then the consolidated notification policy will match the default notification policy * returned by {@link #getNotificationPolicy}. * </p> */ @Nullable public NotificationManager.Policy getConsolidatedNotificationPolicy() { public @NonNull NotificationManager.Policy getConsolidatedNotificationPolicy() { INotificationManager service = getService(); try { return service.getConsolidatedNotificationPolicy(); Loading
services/core/java/com/android/server/notification/ZenModeHelper.java +1 −3 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ public class ZenModeHelper { updateDefaultAutomaticRuleNames(); mConfig = mDefaultConfig.copy(); mConfigs.put(UserHandle.USER_SYSTEM, mConfig); mConsolidatedPolicy = mConfig.toNotificationPolicy(); mSettingsObserver = new SettingsObserver(mHandler); mSettingsObserver.observe(); Loading Loading @@ -821,9 +822,6 @@ public class ZenModeHelper { * @return a copy of the zen mode consolidated policy */ public Policy getConsolidatedNotificationPolicy() { if (mConsolidatedPolicy == null) { return null; } return mConsolidatedPolicy.copy(); } Loading