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

Commit 4d5d47f3 authored by Ahan Wu's avatar Ahan Wu Committed by Wu Ahan
Browse files

Fix black image wallpaper issue

We don't do transition if user unlocks the phone via biometric
authentication, but we haven't canceled the previous animation while
unlocking this way, as a consequence, the reveal state of
imagewallpaper may end up with a wrong state.

Bug: 139487871
Test: Manually test
Change-Id: Ida470d58910cbb22eed10338948aa8a99e8f4343
parent 5a1363bf
Loading
Loading
Loading
Loading
+4 −8
Original line number Original line Diff line number Diff line
@@ -81,12 +81,6 @@ class ImageRevealHelper {
        });
        });
    }
    }


    private void animate() {
        mAnimator.cancel();
        mAnimator.setFloatValues(mReveal, mAwake ? MAX_REVEAL : MIN_REVEAL);
        mAnimator.start();
    }

    public float getReveal() {
    public float getReveal() {
        return mReveal;
        return mReveal;
    }
    }
@@ -95,8 +89,8 @@ class ImageRevealHelper {
        if (DEBUG) {
        if (DEBUG) {
            Log.d(TAG, "updateAwake: awake=" + awake + ", duration=" + duration);
            Log.d(TAG, "updateAwake: awake=" + awake + ", duration=" + duration);
        }
        }
        mAnimator.cancel();
        mAwake = awake;
        mAwake = awake;
        mAnimator.setDuration(duration);
        if (duration == 0) {
        if (duration == 0) {
            // We are transiting from home to aod or aod to home directly,
            // We are transiting from home to aod or aod to home directly,
            // we don't need to do transition in these cases.
            // we don't need to do transition in these cases.
@@ -105,7 +99,9 @@ class ImageRevealHelper {
            mRevealListener.onRevealStateChanged();
            mRevealListener.onRevealStateChanged();
            mRevealListener.onRevealEnd();
            mRevealListener.onRevealEnd();
        } else {
        } else {
            animate();
            mAnimator.setDuration(duration);
            mAnimator.setFloatValues(mReveal, mAwake ? MAX_REVEAL : MIN_REVEAL);
            mAnimator.start();
        }
        }
    }
    }