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

Commit eac2da20 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Pre P apps can't change new fields

Screen off means fullscreen intents, lights, and ambient
in P but pre-P mean only lights and full screen intents.

Test: runtest systemui-notification, cts
Change-Id: I83857b5df2f669751df34d58aa645f4102b8e0e4
Fixes: 77470790
parent ef85bbfe
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1883,7 +1883,6 @@ public class NotificationManagerService extends SystemService {
            if ((newSuppressedVisualEffects & SUPPRESSED_EFFECT_SCREEN_OFF) != 0) {
                newSuppressedVisualEffects |= SUPPRESSED_EFFECT_LIGHTS;
                newSuppressedVisualEffects |= SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
                newSuppressedVisualEffects |= SUPPRESSED_EFFECT_AMBIENT;
            }
            if ((newSuppressedVisualEffects & SUPPRESSED_EFFECT_SCREEN_ON) != 0) {
                newSuppressedVisualEffects |= SUPPRESSED_EFFECT_PEEK;
+2 −2
Original line number Diff line number Diff line
@@ -2558,8 +2558,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {

        int expected = SUPPRESSED_EFFECT_BADGE
                | SUPPRESSED_EFFECT_SCREEN_ON | SUPPRESSED_EFFECT_SCREEN_OFF
                | SUPPRESSED_EFFECT_PEEK | SUPPRESSED_EFFECT_AMBIENT
                | SUPPRESSED_EFFECT_LIGHTS | SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
                | SUPPRESSED_EFFECT_PEEK | SUPPRESSED_EFFECT_LIGHTS
                | SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
        int actual = mService.calculateSuppressedVisualEffects(appPolicy, userPolicy, O_MR1);

        assertEquals(expected, actual);