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

Commit 0b0d8d80 authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "[DO NOT MERGE] DREAMING->LOCKSCREEN, lockscreen updates" into tm-qpr-dev

parents 4475e902 9b898b8f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1272,6 +1272,9 @@
         translate into their final position. -->
    <dimen name="lockscreen_shade_keyguard_transition_distance">@dimen/lockscreen_shade_media_transition_distance</dimen>

    <!-- DREAMING -> LOCKSCREEN transition: Amount to shift lockscreen content on entering -->
    <dimen name="dreaming_to_lockscreen_transition_lockscreen_translation_y">40dp</dimen>

    <!-- The amount of vertical offset for the keyguard during the full shade transition. -->
    <dimen name="lockscreen_shade_keyguard_transition_vertical_offset">0dp</dimen>

+5 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.keyguard;

import static java.util.Collections.emptySet;

import android.content.Context;
import android.os.Trace;
import android.util.AttributeSet;
@@ -88,8 +90,9 @@ public class KeyguardStatusView extends GridLayout {
    }

    /** Sets a translationY value on every child view except for the media view. */
    public void setChildrenTranslationYExcludingMediaView(float translationY) {
        setChildrenTranslationYExcluding(translationY, Set.of(mMediaHostContainer));
    public void setChildrenTranslationY(float translationY, boolean excludeMedia) {
        setChildrenTranslationYExcluding(translationY,
                excludeMedia ? Set.of(mMediaHostContainer) : emptySet());
    }

    /** Sets a translationY value on every view except for the views in the provided set. */
+7 −2
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ import android.graphics.Rect;
import android.util.Slog;

import com.android.keyguard.KeyguardClockSwitch.ClockSize;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.plugins.ClockAnimations;
import com.android.systemui.statusbar.notification.AnimatableProperty;
import com.android.systemui.statusbar.notification.PropertyAnimator;
@@ -59,6 +61,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
            KeyguardUpdateMonitor keyguardUpdateMonitor,
            ConfigurationController configurationController,
            DozeParameters dozeParameters,
            FeatureFlags featureFlags,
            ScreenOffAnimationController screenOffAnimationController) {
        super(keyguardStatusView);
        mKeyguardSliceViewController = keyguardSliceViewController;
@@ -67,6 +70,8 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
        mConfigurationController = configurationController;
        mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController,
                dozeParameters, screenOffAnimationController, /* animateYPos= */ true);
        mKeyguardVisibilityHelper.setOcclusionTransitionFlagEnabled(
                featureFlags.isEnabled(Flags.UNOCCLUSION_TRANSITION));
    }

    @Override
@@ -115,8 +120,8 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
    /**
     * Sets a translationY on the views on the keyguard, except on the media view.
     */
    public void setTranslationYExcludingMedia(float translationY) {
        mView.setChildrenTranslationYExcludingMediaView(translationY);
    public void setTranslationY(float translationY, boolean excludeMedia) {
        mView.setChildrenTranslationY(translationY, excludeMedia);
    }

    /**
+9 −2
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ public class KeyguardVisibilityHelper {
    private boolean mAnimateYPos;
    private boolean mKeyguardViewVisibilityAnimating;
    private boolean mLastOccludedState = false;
    private boolean mIsUnoccludeTransitionFlagEnabled = false;
    private final AnimationProperties mAnimationProperties = new AnimationProperties();

    public KeyguardVisibilityHelper(View view,
@@ -62,6 +63,10 @@ public class KeyguardVisibilityHelper {
        return mKeyguardViewVisibilityAnimating;
    }

    public void setOcclusionTransitionFlagEnabled(boolean enabled) {
        mIsUnoccludeTransitionFlagEnabled = enabled;
    }

    /**
     * Set the visibility of a keyguard view based on some new state.
     */
@@ -129,7 +134,7 @@ public class KeyguardVisibilityHelper {
                // since it may need to be cancelled due to keyguard lifecycle events.
                mScreenOffAnimationController.animateInKeyguard(
                        mView, mAnimateKeyguardStatusViewVisibleEndRunnable);
            } else if (mLastOccludedState && !isOccluded) {
            } else if (!mIsUnoccludeTransitionFlagEnabled && mLastOccludedState && !isOccluded) {
                // An activity was displayed over the lock screen, and has now gone away
                mView.setVisibility(View.VISIBLE);
                mView.setAlpha(0f);
@@ -142,8 +147,10 @@ public class KeyguardVisibilityHelper {
                        .start();
            } else {
                mView.setVisibility(View.VISIBLE);
                if (!mIsUnoccludeTransitionFlagEnabled) {
                    mView.setAlpha(1f);
                }
            }
        } else {
            mView.setVisibility(View.GONE);
            mView.setAlpha(1f);
+9 −4
Original line number Diff line number Diff line
@@ -181,10 +181,6 @@ object Flags {
    @JvmField
    val LIGHT_REVEAL_MIGRATION = unreleasedFlag(218, "light_reveal_migration", teamfood = false)

    // TODO(b/262780002): Tracking Bug
    @JvmField
    val REVAMPED_WALLPAPER_UI = unreleasedFlag(222, "revamped_wallpaper_ui", teamfood = false)

    /** Flag to control the migration of face auth to modern architecture. */
    // TODO(b/262838215): Tracking bug
    @JvmField val FACE_AUTH_REFACTOR = unreleasedFlag(220, "face_auth_refactor")
@@ -193,6 +189,15 @@ object Flags {
    // TODO(b/244313043): Tracking bug
    @JvmField val BIOMETRICS_ANIMATION_REVAMP = unreleasedFlag(221, "biometrics_animation_revamp")

    // TODO(b/262780002): Tracking Bug
    @JvmField
    val REVAMPED_WALLPAPER_UI = unreleasedFlag(222, "revamped_wallpaper_ui", teamfood = false)

    /** A different path for unocclusion transitions back to keyguard */
    // TODO(b/262859270): Tracking Bug
    @JvmField
    val UNOCCLUSION_TRANSITION = unreleasedFlag(223, "unocclusion_transition", teamfood = false)

    // 300 - power menu
    // TODO(b/254512600): Tracking Bug
    @JvmField val POWER_MENU_LITE = releasedFlag(300, "power_menu_lite")
Loading