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

Commit 9d513579 authored by Issei Suzuki's avatar Issei Suzuki Committed by Automerger Merge Worker
Browse files

Fix black frame flicker in UNOCCLUDE transition. am: f5a613e5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16117045

Change-Id: I6ac227678fbb9fbb2767b3166e297a2ef3b430ae
parents 79f142e3 f5a613e5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4630,6 +4630,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        return mKeyguardDelegate.isInputRestricted();
    }

    /** {@inheritDoc} */
    @Override
    public boolean isKeyguardUnoccluding() {
        return keyguardOn() && !mWindowManagerFuncs.isAppTransitionStateIdle();
    }

    @Override
    public void dismissKeyguardLw(IKeyguardDismissCallback callback, CharSequence message) {
        if (mKeyguardDelegate != null && mKeyguardDelegate.isShowing()) {
+14 −0
Original line number Diff line number Diff line
@@ -367,6 +367,12 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
         * as the top display.
         */
        void moveDisplayToTop(int displayId);

        /**
         * Return whether the app transition state is idle.
         * @return {@code true} if app transition state is idle on the default display.
         */
        boolean isAppTransitionStateIdle();
    }

    /**
@@ -973,6 +979,14 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
     */
    public boolean isKeyguardOccluded();

    /**
     * Return whether the keyguard is unoccluding.
     * @return {@code true} if the keyguard is unoccluding.
     */
    default boolean isKeyguardUnoccluding() {
        return false;
    }

    /**
     * @return true if in keyguard is on.
     */
+4 −0
Original line number Diff line number Diff line
@@ -365,6 +365,10 @@ public class AppTransition implements Dump {
        setAppTransitionState(APP_STATE_IDLE);
    }

    boolean isIdle() {
        return mAppTransitionState == APP_STATE_IDLE;
    }

    boolean isTimeout() {
        return mAppTransitionState == APP_STATE_TIMEOUT;
    }
+2 −1
Original line number Diff line number Diff line
@@ -159,7 +159,8 @@ class WallpaperController {
        boolean needsShowWhenLockedWallpaper = false;
        if ((w.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0
                && mService.mPolicy.isKeyguardLocked()
                && mService.mPolicy.isKeyguardOccluded()) {
                && (mService.mPolicy.isKeyguardOccluded()
                || mService.mPolicy.isKeyguardUnoccluding())) {
            // The lowest show when locked window decides whether we need to put the wallpaper
            // behind.
            needsShowWhenLockedWallpaper = !isFullscreen(w.mAttrs)
+5 −0
Original line number Diff line number Diff line
@@ -3071,6 +3071,11 @@ public class WindowManagerService extends IWindowManager.Stub
        syncInputTransactions(true /* waitForAnimations */);
    }

    @Override
    public boolean isAppTransitionStateIdle() {
        return getDefaultDisplayContentLocked().mAppTransition.isIdle();
    }

    /**
     * Notifies activity manager that some Keyguard flags have changed and that it needs to
     * reevaluate the visibilities of the activities.