Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java +2 −4 Original line number Diff line number Diff line Loading @@ -285,14 +285,12 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW } private void applyKeyguardFlags(State state) { final boolean scrimsOccludingWallpaper = state.mScrimsVisibility == ScrimController.OPAQUE || state.mLightRevealScrimOpaque; final boolean keyguardOrAod = state.mKeyguardShowing || (state.mDozing && mDozeParameters.getAlwaysOn()); if ((keyguardOrAod && !state.mBackdropShowing && !scrimsOccludingWallpaper) if ((keyguardOrAod && !state.mBackdropShowing && !state.mLightRevealScrimOpaque) || mKeyguardViewMediator.isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe()) { // Show the wallpaper if we're on keyguard/AOD and the wallpaper is not occluded by a // solid backdrop or scrim. Also, show it if we are currently animating between the // solid backdrop. Also, show it if we are currently animating between the // keyguard and the surface behind the keyguard - we want to use the wallpaper as a // backdrop for this animation. mLpChanged.flags |= LayoutParams.FLAG_SHOW_WALLPAPER; Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImplTest.java +5 −3 Original line number Diff line number Diff line Loading @@ -155,14 +155,16 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { } @Test public void attach_scrimHidesWallpaper() { public void attach_scrimDoesntHideWallpaper() { when(mKeyguardViewMediator.isShowingAndNotOccluded()).thenReturn(true); mNotificationShadeWindowController.attach(); clearInvocations(mWindowManager); mNotificationShadeWindowController.setScrimsVisibility(ScrimController.OPAQUE); verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture()); assertThat((mLayoutParameters.getValue().flags & FLAG_SHOW_WALLPAPER) == 0).isTrue(); // The scrim used to remove the wallpaper flag, but this causes a relayout. // Instead, we're not relying on SurfaceControl#setOpaque on // NotificationShadeDepthController. verify(mWindowManager, never()).updateViewLayout(any(), mLayoutParameters.capture()); } @Test Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java +2 −4 Original line number Diff line number Diff line Loading @@ -285,14 +285,12 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW } private void applyKeyguardFlags(State state) { final boolean scrimsOccludingWallpaper = state.mScrimsVisibility == ScrimController.OPAQUE || state.mLightRevealScrimOpaque; final boolean keyguardOrAod = state.mKeyguardShowing || (state.mDozing && mDozeParameters.getAlwaysOn()); if ((keyguardOrAod && !state.mBackdropShowing && !scrimsOccludingWallpaper) if ((keyguardOrAod && !state.mBackdropShowing && !state.mLightRevealScrimOpaque) || mKeyguardViewMediator.isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe()) { // Show the wallpaper if we're on keyguard/AOD and the wallpaper is not occluded by a // solid backdrop or scrim. Also, show it if we are currently animating between the // solid backdrop. Also, show it if we are currently animating between the // keyguard and the surface behind the keyguard - we want to use the wallpaper as a // backdrop for this animation. mLpChanged.flags |= LayoutParams.FLAG_SHOW_WALLPAPER; Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImplTest.java +5 −3 Original line number Diff line number Diff line Loading @@ -155,14 +155,16 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { } @Test public void attach_scrimHidesWallpaper() { public void attach_scrimDoesntHideWallpaper() { when(mKeyguardViewMediator.isShowingAndNotOccluded()).thenReturn(true); mNotificationShadeWindowController.attach(); clearInvocations(mWindowManager); mNotificationShadeWindowController.setScrimsVisibility(ScrimController.OPAQUE); verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture()); assertThat((mLayoutParameters.getValue().flags & FLAG_SHOW_WALLPAPER) == 0).isTrue(); // The scrim used to remove the wallpaper flag, but this causes a relayout. // Instead, we're not relying on SurfaceControl#setOpaque on // NotificationShadeDepthController. verify(mWindowManager, never()).updateViewLayout(any(), mLayoutParameters.capture()); } @Test Loading