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

Commit 02151cbb authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Allow an adjustment to have multiple signals" into main

parents 437874cb 909f92ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+3 −1
Original line number Diff line number Diff line
@@ -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) {
@@ -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());