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

Commit ff952a22 authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "Fix wallpaper showing on AOD" into sc-dev am: 6b9f1a5e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15176330

Change-Id: I94c440ed0d9f780984b5596428525f0ec04fd1e1
parents 06402852 6b9f1a5e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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. -->
+4 −0
Original line number Diff line number Diff line
@@ -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
@@ -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.
@@ -158,6 +161,7 @@ class LightRevealScrim(context: Context?, attrs: AttributeSet?) : View(context,
                field = value

                revealEffect.setRevealAmountOnScrim(value, this)
                revealAmountListener.accept(value)
                invalidate()
            }
        }
+6 −0
Original line number Diff line number Diff line
@@ -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.
+12 −1
Original line number Diff line number Diff line
@@ -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)
@@ -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;
@@ -734,6 +744,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
        boolean mKeyguardGoingAway;
        boolean mQsExpanded;
        boolean mHeadsUpShowing;
        boolean mLightRevealScrimOpaque;
        boolean mForceCollapsed;
        boolean mForceDozeBrightness;
        int mFaceAuthDisplayBrightness;
+2 −0
Original line number Diff line number Diff line
@@ -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