Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 909f92ab authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Allow an adjustment to have multiple signals

Change-Id: Ica48883fa212d87798f89f19cc34ffe4fd7236b4
Test: NotificationManagerServiceTest
Bug: 391844046
Flag: android.service.notification.notification_classification
parent 39d38ede
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7212,7 +7212,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);
+3 −1
Original line number Diff line number Diff line
@@ -600,7 +600,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) {
@@ -10889,6 +10890,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());