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

Commit da8f622b authored by Chris Wren's avatar Chris Wren
Browse files

animating challenge closed should close the challenge.

Bug: 7486591
Change-Id: Ie19a3765c63b885539a621467c2fdc81041578a7
Proto:Id: Iedf69f2f4e97f313af0228954a75f5a494b33c88
parent 088fb915
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
    // Range: 0 (fully hidden) to 1 (fully visible)
    private float mChallengeOffset = 1.f;
    private boolean mChallengeShowing = true;
    private boolean mChallengeShowingTargetState = true;
    private boolean mWasChallengeShowing = true;
    private boolean mIsBouncing = false;

@@ -355,7 +356,8 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
    }

    void completeChallengeScroll() {
        setChallengeShowing(mChallengeOffset != 0);
        setChallengeShowing(mChallengeShowingTargetState);
        mChallengeOffset = mChallengeShowing ? 1.f : 0.f;
        setScrollState(SCROLL_STATE_IDLE);
        mChallengeInteractiveInternal = true;
        mChallengeView.setLayerType(LAYER_TYPE_NONE, null);
@@ -1112,6 +1114,7 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
        }

        if (mHasLayout) {
            mChallengeShowingTargetState = show;
            final int layoutBottom = getLayoutBottom();
            animateChallengeTo(show ? layoutBottom :
                    layoutBottom + mChallengeView.getHeight() - mChallengeBottomBound, velocity);