Loading packages/SystemUI/res/values/flags.xml +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ <bool name="flag_conversations">false</bool> <!-- The new animations to/from lockscreen and AOD! --> <bool name="flag_lockscreen_animations">false</bool> <bool name="flag_lockscreen_animations">true</bool> <!-- The new swipe to unlock animation, which shows the app/launcher behind the keyguard during the swipe. --> Loading packages/SystemUI/src/com/android/systemui/statusbar/LightRevealScrim.kt +4 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import android.graphics.Shader import android.util.AttributeSet import android.view.View import com.android.systemui.animation.Interpolators import java.util.function.Consumer /** * Provides methods to modify the various properties of a [LightRevealScrim] to reveal between 0% to Loading Loading @@ -148,6 +149,8 @@ class PowerButtonReveal( */ class LightRevealScrim(context: Context?, attrs: AttributeSet?) : View(context, attrs) { lateinit var revealAmountListener: Consumer<Float> /** * How much of the underlying views are revealed, in percent. 0 means they will be completely * obscured and 1 means they'll be fully visible. Loading @@ -158,6 +161,7 @@ class LightRevealScrim(context: Context?, attrs: AttributeSet?) : View(context, field = value revealEffect.setRevealAmountOnScrim(value, this) revealAmountListener.accept(value) invalidate() } } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeWindowController.java +6 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,12 @@ public interface NotificationShadeWindowController extends RemoteInputController */ default void setFaceAuthDisplayBrightness(float brightness) {} /** * How much {@link LightRevealScrim} obscures the UI. * @param amount 0 when opaque, 1 when not transparent */ default void setLightRevealScrimAmount(float amount) {} /** * Custom listener to pipe data back to plugins about whether or not the status bar would be * collapsed if not for the plugin. Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java +12 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW private void applyKeyguardFlags(State state) { final boolean scrimsOccludingWallpaper = state.mScrimsVisibility == ScrimController.OPAQUE; state.mScrimsVisibility == ScrimController.OPAQUE || state.mLightRevealScrimOpaque; final boolean keyguardOrAod = state.mKeyguardShowing || (state.mDozing && mDozeParameters.getAlwaysOn()); if ((keyguardOrAod && !state.mBackdropShowing && !scrimsOccludingWallpaper) Loading Loading @@ -569,6 +569,16 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW apply(mCurrentState); } @Override public void setLightRevealScrimAmount(float amount) { boolean lightRevealScrimOpaque = amount == 0; if (mCurrentState.mLightRevealScrimOpaque == lightRevealScrimOpaque) { return; } mCurrentState.mLightRevealScrimOpaque = lightRevealScrimOpaque; apply(mCurrentState); } @Override public void setWallpaperSupportsAmbientMode(boolean supportsAmbientMode) { mCurrentState.mWallpaperSupportsAmbientMode = supportsAmbientMode; Loading Loading @@ -734,6 +744,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW boolean mKeyguardGoingAway; boolean mQsExpanded; boolean mHeadsUpShowing; boolean mLightRevealScrimOpaque; boolean mForceCollapsed; boolean mForceDozeBrightness; int mFaceAuthDisplayBrightness; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +2 −0 Original line number Diff line number Diff line Loading @@ -1243,6 +1243,8 @@ public class StatusBar extends SystemUI implements DemoMode, mScrimController.attachViews(scrimBehind, notificationsScrim, scrimInFront, scrimForBubble); mLightRevealScrim = mNotificationShadeWindowView.findViewById(R.id.light_reveal_scrim); mLightRevealScrim.setRevealAmountListener( mNotificationShadeWindowController::setLightRevealScrimAmount); mUnlockedScreenOffAnimationController.initialize(this, mLightRevealScrim); updateLightRevealScrimVisibility(); Loading Loading
packages/SystemUI/res/values/flags.xml +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ <bool name="flag_conversations">false</bool> <!-- The new animations to/from lockscreen and AOD! --> <bool name="flag_lockscreen_animations">false</bool> <bool name="flag_lockscreen_animations">true</bool> <!-- The new swipe to unlock animation, which shows the app/launcher behind the keyguard during the swipe. --> Loading
packages/SystemUI/src/com/android/systemui/statusbar/LightRevealScrim.kt +4 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import android.graphics.Shader import android.util.AttributeSet import android.view.View import com.android.systemui.animation.Interpolators import java.util.function.Consumer /** * Provides methods to modify the various properties of a [LightRevealScrim] to reveal between 0% to Loading Loading @@ -148,6 +149,8 @@ class PowerButtonReveal( */ class LightRevealScrim(context: Context?, attrs: AttributeSet?) : View(context, attrs) { lateinit var revealAmountListener: Consumer<Float> /** * How much of the underlying views are revealed, in percent. 0 means they will be completely * obscured and 1 means they'll be fully visible. Loading @@ -158,6 +161,7 @@ class LightRevealScrim(context: Context?, attrs: AttributeSet?) : View(context, field = value revealEffect.setRevealAmountOnScrim(value, this) revealAmountListener.accept(value) invalidate() } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeWindowController.java +6 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,12 @@ public interface NotificationShadeWindowController extends RemoteInputController */ default void setFaceAuthDisplayBrightness(float brightness) {} /** * How much {@link LightRevealScrim} obscures the UI. * @param amount 0 when opaque, 1 when not transparent */ default void setLightRevealScrimAmount(float amount) {} /** * Custom listener to pipe data back to plugins about whether or not the status bar would be * collapsed if not for the plugin. Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java +12 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW private void applyKeyguardFlags(State state) { final boolean scrimsOccludingWallpaper = state.mScrimsVisibility == ScrimController.OPAQUE; state.mScrimsVisibility == ScrimController.OPAQUE || state.mLightRevealScrimOpaque; final boolean keyguardOrAod = state.mKeyguardShowing || (state.mDozing && mDozeParameters.getAlwaysOn()); if ((keyguardOrAod && !state.mBackdropShowing && !scrimsOccludingWallpaper) Loading Loading @@ -569,6 +569,16 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW apply(mCurrentState); } @Override public void setLightRevealScrimAmount(float amount) { boolean lightRevealScrimOpaque = amount == 0; if (mCurrentState.mLightRevealScrimOpaque == lightRevealScrimOpaque) { return; } mCurrentState.mLightRevealScrimOpaque = lightRevealScrimOpaque; apply(mCurrentState); } @Override public void setWallpaperSupportsAmbientMode(boolean supportsAmbientMode) { mCurrentState.mWallpaperSupportsAmbientMode = supportsAmbientMode; Loading Loading @@ -734,6 +744,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW boolean mKeyguardGoingAway; boolean mQsExpanded; boolean mHeadsUpShowing; boolean mLightRevealScrimOpaque; boolean mForceCollapsed; boolean mForceDozeBrightness; int mFaceAuthDisplayBrightness; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +2 −0 Original line number Diff line number Diff line Loading @@ -1243,6 +1243,8 @@ public class StatusBar extends SystemUI implements DemoMode, mScrimController.attachViews(scrimBehind, notificationsScrim, scrimInFront, scrimForBubble); mLightRevealScrim = mNotificationShadeWindowView.findViewById(R.id.light_reveal_scrim); mLightRevealScrim.setRevealAmountListener( mNotificationShadeWindowController::setLightRevealScrimAmount); mUnlockedScreenOffAnimationController.initialize(this, mLightRevealScrim); updateLightRevealScrimVisibility(); Loading