Loading api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5393,7 +5393,6 @@ package android.app { method public android.net.Uri getSound(); method public long[] getVibrationPattern(); method public boolean isAllowed(); method public void setAllowed(boolean); method public void setBypassDnd(boolean); method public void setImportance(int); method public void setLights(boolean); api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5555,7 +5555,6 @@ package android.app { method public boolean isAllowed(); method public void lockFields(int); method public void populateFromXml(org.xmlpull.v1.XmlPullParser); method public void setAllowed(boolean); method public void setBypassDnd(boolean); method public void setImportance(int); method public void setLights(boolean); api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5403,7 +5403,6 @@ package android.app { method public android.net.Uri getSound(); method public long[] getVibrationPattern(); method public boolean isAllowed(); method public void setAllowed(boolean); method public void setBypassDnd(boolean); method public void setImportance(int); method public void setLights(boolean); core/java/android/app/NotificationChannel.java +0 −19 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ public final class NotificationChannel implements Parcelable { private static final String ATT_AUDIO_ATTRIBUTES = "audio_attributes"; private static final String ATT_SHOW_BADGE = "show_badge"; private static final String ATT_USER_LOCKED = "locked"; private static final String ATT_ALLOWED = "allowed"; private static final String DELIMITER = ","; /** Loading Loading @@ -243,18 +242,6 @@ public final class NotificationChannel implements Parcelable { this.mImportance = importance; } /** * Sets whether notifications are allowed to be posted to this channel. * * Only modifiable by the system and notification ranker. * * @param allowed true if notifications are not allowed from this channel. */ public void setAllowed(boolean allowed) { this.mAllowed = allowed; } // Modifiable by apps on channel creation. /** Loading Loading @@ -406,7 +393,6 @@ public final class NotificationChannel implements Parcelable { enableVibration(safeBool(parser, ATT_VIBRATION_ENABLED, false)); setVibrationPattern(safeLongArray(parser, ATT_VIBRATION, null)); setShowBadge(safeBool(parser, ATT_SHOW_BADGE, false)); setAllowed(safeBool(parser, ATT_ALLOWED, true)); lockFields(safeInt(parser, ATT_USER_LOCKED, 0)); } Loading Loading @@ -448,9 +434,6 @@ public final class NotificationChannel implements Parcelable { if (canShowBadge()) { out.attribute(null, ATT_SHOW_BADGE, Boolean.toString(canShowBadge())); } if (!isAllowed()) { out.attribute(null, ATT_ALLOWED, Boolean.toString(isAllowed())); } out.endTag(null, TAG_CHANNEL); } Loading Loading @@ -481,8 +464,6 @@ public final class NotificationChannel implements Parcelable { record.put(ATT_USER_LOCKED, Integer.toString(getUserLockedFields())); record.put(ATT_VIBRATION, longArrayToString(getVibrationPattern())); record.put(ATT_SHOW_BADGE, Boolean.toString(canShowBadge())); record.put(ATT_ALLOWED, Boolean.toString(isAllowed())); return record; } Loading services/core/java/com/android/server/notification/NotificationManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -1552,7 +1552,7 @@ public class NotificationManagerService extends SystemService { public void updateNotificationChannelForPackage(String pkg, int uid, NotificationChannel channel) { enforceSystemOrSystemUI("Caller not system or systemui"); if (!channel.isAllowed()) { if (channel.getImportance() == NotificationManager.IMPORTANCE_NONE) { // cancel cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, UserHandle.getUserId(Binder.getCallingUid()), REASON_CHANNEL_BANNED, Loading Loading @@ -2441,7 +2441,7 @@ public class NotificationManagerService extends SystemService { public void updateNotificationChannelFromAssistant(INotificationListener token, String pkg, NotificationChannel channel) throws RemoteException { ManagedServiceInfo info = mNotificationAssistants.checkServiceTokenLocked(token); if (!channel.isAllowed()) { if (channel.getImportance() == NotificationManager.IMPORTANCE_NONE) { // cancel cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, info.userid, REASON_CHANNEL_BANNED, null); Loading Loading @@ -2985,7 +2985,7 @@ public class NotificationManagerService extends SystemService { } final boolean isBlocked = r.getImportance() == NotificationManager.IMPORTANCE_NONE || !r.getChannel().isAllowed() || r.getChannel().getImportance() == NotificationManager.IMPORTANCE_NONE || !noteNotificationOp(pkg, callingUid); if (isBlocked) { Slog.e(TAG, "Suppressing notification from package by user request."); Loading Loading
api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5393,7 +5393,6 @@ package android.app { method public android.net.Uri getSound(); method public long[] getVibrationPattern(); method public boolean isAllowed(); method public void setAllowed(boolean); method public void setBypassDnd(boolean); method public void setImportance(int); method public void setLights(boolean);
api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5555,7 +5555,6 @@ package android.app { method public boolean isAllowed(); method public void lockFields(int); method public void populateFromXml(org.xmlpull.v1.XmlPullParser); method public void setAllowed(boolean); method public void setBypassDnd(boolean); method public void setImportance(int); method public void setLights(boolean);
api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5403,7 +5403,6 @@ package android.app { method public android.net.Uri getSound(); method public long[] getVibrationPattern(); method public boolean isAllowed(); method public void setAllowed(boolean); method public void setBypassDnd(boolean); method public void setImportance(int); method public void setLights(boolean);
core/java/android/app/NotificationChannel.java +0 −19 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ public final class NotificationChannel implements Parcelable { private static final String ATT_AUDIO_ATTRIBUTES = "audio_attributes"; private static final String ATT_SHOW_BADGE = "show_badge"; private static final String ATT_USER_LOCKED = "locked"; private static final String ATT_ALLOWED = "allowed"; private static final String DELIMITER = ","; /** Loading Loading @@ -243,18 +242,6 @@ public final class NotificationChannel implements Parcelable { this.mImportance = importance; } /** * Sets whether notifications are allowed to be posted to this channel. * * Only modifiable by the system and notification ranker. * * @param allowed true if notifications are not allowed from this channel. */ public void setAllowed(boolean allowed) { this.mAllowed = allowed; } // Modifiable by apps on channel creation. /** Loading Loading @@ -406,7 +393,6 @@ public final class NotificationChannel implements Parcelable { enableVibration(safeBool(parser, ATT_VIBRATION_ENABLED, false)); setVibrationPattern(safeLongArray(parser, ATT_VIBRATION, null)); setShowBadge(safeBool(parser, ATT_SHOW_BADGE, false)); setAllowed(safeBool(parser, ATT_ALLOWED, true)); lockFields(safeInt(parser, ATT_USER_LOCKED, 0)); } Loading Loading @@ -448,9 +434,6 @@ public final class NotificationChannel implements Parcelable { if (canShowBadge()) { out.attribute(null, ATT_SHOW_BADGE, Boolean.toString(canShowBadge())); } if (!isAllowed()) { out.attribute(null, ATT_ALLOWED, Boolean.toString(isAllowed())); } out.endTag(null, TAG_CHANNEL); } Loading Loading @@ -481,8 +464,6 @@ public final class NotificationChannel implements Parcelable { record.put(ATT_USER_LOCKED, Integer.toString(getUserLockedFields())); record.put(ATT_VIBRATION, longArrayToString(getVibrationPattern())); record.put(ATT_SHOW_BADGE, Boolean.toString(canShowBadge())); record.put(ATT_ALLOWED, Boolean.toString(isAllowed())); return record; } Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -1552,7 +1552,7 @@ public class NotificationManagerService extends SystemService { public void updateNotificationChannelForPackage(String pkg, int uid, NotificationChannel channel) { enforceSystemOrSystemUI("Caller not system or systemui"); if (!channel.isAllowed()) { if (channel.getImportance() == NotificationManager.IMPORTANCE_NONE) { // cancel cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, UserHandle.getUserId(Binder.getCallingUid()), REASON_CHANNEL_BANNED, Loading Loading @@ -2441,7 +2441,7 @@ public class NotificationManagerService extends SystemService { public void updateNotificationChannelFromAssistant(INotificationListener token, String pkg, NotificationChannel channel) throws RemoteException { ManagedServiceInfo info = mNotificationAssistants.checkServiceTokenLocked(token); if (!channel.isAllowed()) { if (channel.getImportance() == NotificationManager.IMPORTANCE_NONE) { // cancel cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, info.userid, REASON_CHANNEL_BANNED, null); Loading Loading @@ -2985,7 +2985,7 @@ public class NotificationManagerService extends SystemService { } final boolean isBlocked = r.getImportance() == NotificationManager.IMPORTANCE_NONE || !r.getChannel().isAllowed() || r.getChannel().getImportance() == NotificationManager.IMPORTANCE_NONE || !noteNotificationOp(pkg, callingUid); if (isBlocked) { Slog.e(TAG, "Suppressing notification from package by user request."); Loading