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

Commit e9861964 authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "AOD animation polish" into pi-dev

am: 704a0d61

Change-Id: Ia5662e819573ba45707f4f2dd4f166c64d87154e
parents 93c577b2 704a0d61
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -199,6 +199,9 @@ public class KeyguardStatusView extends GridLayout implements
        mClockView.setElegantTextHeight(false);
        mClockView.setElegantTextHeight(false);
    }
    }


    /**
     * Moves clock and separator, adjusting margins when slice content changes.
     */
    private void onSliceContentChanged() {
    private void onSliceContentChanged() {
        boolean smallClock = mKeyguardSlice.hasHeader() || mPulsing;
        boolean smallClock = mKeyguardSlice.hasHeader() || mPulsing;
        float clockScale = smallClock ? mSmallClockScale : 1;
        float clockScale = smallClock ? mSmallClockScale : 1;
@@ -221,7 +224,7 @@ public class KeyguardStatusView extends GridLayout implements
    @Override
    @Override
    public void onLayoutChange(View view, int left, int top, int right, int bottom,
    public void onLayoutChange(View view, int left, int top, int right, int bottom,
            int oldLeft, int oldTop, int oldRight, int oldBottom) {
            int oldLeft, int oldTop, int oldRight, int oldBottom) {
        int heightOffset = mPulsing ? 0 : getHeight() - mLastLayoutHeight;
        int heightOffset = mPulsing || mWasPulsing ? 0 : getHeight() - mLastLayoutHeight;
        boolean hasHeader = mKeyguardSlice.hasHeader();
        boolean hasHeader = mKeyguardSlice.hasHeader();
        boolean smallClock = hasHeader || mPulsing;
        boolean smallClock = hasHeader || mPulsing;
        long duration = KeyguardSliceView.DEFAULT_ANIM_DURATION;
        long duration = KeyguardSliceView.DEFAULT_ANIM_DURATION;
@@ -457,6 +460,11 @@ public class KeyguardStatusView extends GridLayout implements
            mWasPulsing = true;
            mWasPulsing = true;
        }
        }
        mPulsing = pulsing;
        mPulsing = pulsing;
        // Animation can look really weird when the slice has a header, let's hide the views
        // immediately instead of fading them away.
        if (mKeyguardSlice.hasHeader()) {
            animate = false;
        }
        mKeyguardSlice.setPulsing(pulsing, animate);
        mKeyguardSlice.setPulsing(pulsing, animate);
        updateDozeVisibleViews();
        updateDozeVisibleViews();
    }
    }