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

Commit cdf07126 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

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

parents 66cd756c 05746aea
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)
@@ -570,6 +570,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;
@@ -735,6 +745,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