Loading services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7249,7 +7249,7 @@ public class NotificationManagerService extends SystemService { if (!mAssistants.isAdjustmentAllowed(potentialKey)) { toRemove.add(potentialKey); } if (notificationClassification() && adjustments.containsKey(KEY_TYPE)) { if (notificationClassification() && potentialKey.equals(KEY_TYPE)) { mAssistants.setNasUnsupportedDefaults(r.getSbn().getNormalizedUserId()); if (!mAssistants.isAdjustmentKeyTypeAllowed(adjustments.getInt(KEY_TYPE))) { toRemove.add(potentialKey); Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -603,7 +603,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Parameters(name = "{0}") public static List<FlagsParameterization> getParams() { return FlagsParameterization.allCombinationsOf(); return FlagsParameterization.allCombinationsOf( FLAG_NOTIFICATION_CLASSIFICATION); } public NotificationManagerServiceTest(FlagsParameterization flags) { Loading Loading @@ -10892,6 +10893,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { Bundle signals = new Bundle(); signals.putInt(KEY_IMPORTANCE, IMPORTANCE_LOW); signals.putInt(KEY_USER_SENTIMENT, USER_SENTIMENT_NEGATIVE); signals.putInt(KEY_TYPE, TYPE_PROMOTION); Adjustment adjustment = new Adjustment(r.getSbn().getPackageName(), r.getKey(), signals, "", r.getUser().getIdentifier()); Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7249,7 +7249,7 @@ public class NotificationManagerService extends SystemService { if (!mAssistants.isAdjustmentAllowed(potentialKey)) { toRemove.add(potentialKey); } if (notificationClassification() && adjustments.containsKey(KEY_TYPE)) { if (notificationClassification() && potentialKey.equals(KEY_TYPE)) { mAssistants.setNasUnsupportedDefaults(r.getSbn().getNormalizedUserId()); if (!mAssistants.isAdjustmentKeyTypeAllowed(adjustments.getInt(KEY_TYPE))) { toRemove.add(potentialKey); Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -603,7 +603,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Parameters(name = "{0}") public static List<FlagsParameterization> getParams() { return FlagsParameterization.allCombinationsOf(); return FlagsParameterization.allCombinationsOf( FLAG_NOTIFICATION_CLASSIFICATION); } public NotificationManagerServiceTest(FlagsParameterization flags) { Loading Loading @@ -10892,6 +10893,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { Bundle signals = new Bundle(); signals.putInt(KEY_IMPORTANCE, IMPORTANCE_LOW); signals.putInt(KEY_USER_SENTIMENT, USER_SENTIMENT_NEGATIVE); signals.putInt(KEY_TYPE, TYPE_PROMOTION); Adjustment adjustment = new Adjustment(r.getSbn().getPackageName(), r.getKey(), signals, "", r.getUser().getIdentifier());