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

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

Revert "Implements the aod appearing transition"

This reverts commit 649a78d2.

Flag: EXEMPT direct revert
Test: N/A
Reason for revert: Causes KEYGUARD_APPEARING to be sent erroneously
Bug: 396134691

Change-Id: I31040b8f47bc7d889df4a6607f4f23d41a6161a1
parent 649a78d2
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -624,12 +624,6 @@ public interface WindowManager extends ViewManager {
     */
    int TRANSIT_FLAG_PHYSICAL_DISPLAY_SWITCH = (1 << 14); // 0x4000

    /**
     * Transition flag: Indicates that aod is showing hidden by entering doze
     * @hide
     */
    int TRANSIT_FLAG_AOD_APPEARING = (1 << 15); // 0x8000

    /**
     * @hide
     */
@@ -649,7 +643,6 @@ public interface WindowManager extends ViewManager {
            TRANSIT_FLAG_KEYGUARD_OCCLUDING,
            TRANSIT_FLAG_KEYGUARD_UNOCCLUDING,
            TRANSIT_FLAG_PHYSICAL_DISPLAY_SWITCH,
            TRANSIT_FLAG_AOD_APPEARING,
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface TransitionFlags {}
@@ -666,8 +659,7 @@ public interface WindowManager extends ViewManager {
            (TRANSIT_FLAG_KEYGUARD_GOING_AWAY
            | TRANSIT_FLAG_KEYGUARD_APPEARING
            | TRANSIT_FLAG_KEYGUARD_OCCLUDING
            | TRANSIT_FLAG_KEYGUARD_UNOCCLUDING
            | TRANSIT_FLAG_AOD_APPEARING);
            | TRANSIT_FLAG_KEYGUARD_UNOCCLUDING);

    /**
     * Remove content mode: Indicates remove content mode is currently not defined.
+1 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import static android.view.Display.INVALID_DISPLAY;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_UNSPECIFIED;
import static android.view.WindowManager.TRANSIT_CHANGE;
import static android.view.WindowManager.TRANSIT_CLOSE;
import static android.view.WindowManager.TRANSIT_FLAG_AOD_APPEARING;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_APPEARING;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY;
import static android.view.WindowManager.TRANSIT_NONE;
@@ -406,8 +405,7 @@ public final class TransitionInfo implements Parcelable {
     */
    public boolean hasChangesOrSideEffects() {
        return !mChanges.isEmpty() || isKeyguardGoingAway()
                || (mFlags & TRANSIT_FLAG_KEYGUARD_APPEARING) != 0
                || (mFlags & TRANSIT_FLAG_AOD_APPEARING) != 0;
                || (mFlags & TRANSIT_FLAG_KEYGUARD_APPEARING) != 0;
    }

    /**
+1 −3
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.service.dreams.Flags.dismissDreamOnKeyguardDismiss;
import static android.view.WindowManager.KEYGUARD_VISIBILITY_TRANSIT_FLAGS;
import static android.view.WindowManager.TRANSIT_FLAG_AOD_APPEARING;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_APPEARING;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_LOCKED;
@@ -201,8 +200,7 @@ public class KeyguardTransitionHandler
                    transition, info, startTransaction, finishTransaction, finishCallback);
        }

        if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_APPEARING) != 0
                || (info.getFlags() & TRANSIT_FLAG_AOD_APPEARING) != 0) {
        if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_APPEARING) != 0) {
            return startAnimation(mAppearTransition, "appearing",
                    transition, info, startTransaction, finishTransaction, finishCallback);
        }
+0 −16
Original line number Diff line number Diff line
@@ -6629,22 +6629,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                .getKeyguardController().isKeyguardLocked(mDisplayId);
    }

    boolean isKeyguardLockedOrAodShowing() {
        return isKeyguardLocked() || isAodShowing();
    }

    /**
     * @return whether aod is showing for this display
     */
    boolean isAodShowing() {
        final boolean isAodShowing = mRootWindowContainer.mTaskSupervisor
                .getKeyguardController().isAodShowing(mDisplayId);
        if (mDisplayId == DEFAULT_DISPLAY && isAodShowing) {
            return !isKeyguardGoingAway();
        }
        return isAodShowing;
    }

    /**
     * @return whether keyguard is going away on this display
     */
+6 −18
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.server.wm;

import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.TRANSIT_FLAG_AOD_APPEARING;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_APPEARING;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION;
@@ -217,9 +216,6 @@ class KeyguardController {
                } else if (keyguardShowing && !state.mKeyguardShowing) {
                    transition.addFlag(TRANSIT_FLAG_KEYGUARD_APPEARING);
                }
                if (mWindowManager.mFlags.mAodTransition && aodShowing && !state.mAodShowing) {
                    transition.addFlag(TRANSIT_FLAG_AOD_APPEARING);
                }
            }
        }
        // Update the task snapshot if the screen will not be turned off. To make sure that the
@@ -242,27 +238,19 @@ class KeyguardController {
        state.mAodShowing = aodShowing;
        state.writeEventLog("setKeyguardShown");

        if (keyguardChanged || aodChanged) {
        if (keyguardChanged) {
            // Irrelevant to AOD.
            state.mKeyguardGoingAway = false;
            if (keyguardShowing) {
                state.mDismissalRequested = false;
            }
            }
            if (goingAwayRemoved
                    || (keyguardShowing && !Display.isOffState(dc.getDisplayInfo().state))
                    || (mWindowManager.mFlags.mAodTransition && aodShowing)) {
                    || (keyguardShowing && !Display.isOffState(dc.getDisplayInfo().state))) {
                // Keyguard decided to show or stopped going away. Send a transition to animate back
                // to the locked state before holding the sleep token again
                if (!ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS) {
                    dc.requestTransitionAndLegacyPrepare(
                            TRANSIT_TO_FRONT, TRANSIT_FLAG_KEYGUARD_APPEARING);
                    if (mWindowManager.mFlags.mAodTransition && aodShowing
                            && dc.mTransitionController.isCollecting()) {
                        dc.mTransitionController.getCollectingTransition().addFlag(
                                TRANSIT_FLAG_AOD_APPEARING);
                    }
                }
                dc.mWallpaperController.adjustWallpaperWindows();
                dc.executeAppTransition();
Loading