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

Commit c83912b8 authored by Robin Lee's avatar Robin Lee Committed by Android (Google) Code Review
Browse files

Merge "Don't let Keyguard play un/occlude when not visible" into main

parents 1775b9d4 95a8b32c
Loading
Loading
Loading
Loading
+20 −15
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.WindowManager.KEYGUARD_VISIBILITY_TRANSIT_FLAGS;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_LOCKED;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_OCCLUDING;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_UNOCCLUDING;
import static android.view.WindowManager.TRANSIT_SLEEP;
@@ -134,6 +135,9 @@ public class KeyguardTransitionHandler implements Transitions.TransitionHandler
                    "going-away",
                    transition, info, startTransaction, finishTransaction, finishCallback);
        }

        // Occlude/unocclude animations are only played if the keyguard is locked.
        if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_LOCKED) != 0) {
            if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_OCCLUDING) != 0) {
                if (hasOpeningDream(info)) {
                    return startAnimation(mOccludeByDreamTransition,
@@ -148,11 +152,12 @@ public class KeyguardTransitionHandler implements Transitions.TransitionHandler
                return startAnimation(mUnoccludeTransition,
                        "unocclude",
                        transition, info, startTransaction, finishTransaction, finishCallback);
        } else {
            }
        }

        Log.i(TAG, "Refused to play keyguard transition: " + info);
        return false;
    }
    }

    private boolean startAnimation(IRemoteTransition remoteHandler, String description,
            @NonNull IBinder transition, @NonNull TransitionInfo info,