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

Commit 4d304a58 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Remove legacy prepareAppTransition and old type check" into main

parents 7a3c826d 3c50c9df
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -6706,12 +6706,6 @@ 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()) {
+0 −14
Original line number Diff line number Diff line
@@ -336,12 +336,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
         */
        void moveDisplayToTopIfAllowed(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();

        /**
         * Enables the screen if all conditions are met.
         */
@@ -988,14 +982,6 @@ 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.
     */
+0 −3
Original line number Diff line number Diff line
@@ -1510,9 +1510,6 @@ class ActivityClientController extends IActivityClientController.Stub {
        synchronized (mGlobalLock) {
            final ActivityRecord r = ActivityRecord.isInRootTaskLocked(token);
            if (r != null && r.isState(RESUMED, PAUSING)) {
                r.mDisplayContent.mAppTransition.overridePendingAppTransition(
                        packageName, enterAnim, exitAnim, backgroundColor, null, null,
                        r.mOverrideTaskTransition);
                r.mTransitionController.setOverrideAnimation(
                        TransitionInfo.AnimationOptions.makeCustomAnimOptions(packageName,
                                enterAnim, 0 /* changeResId */, exitAnim,
+0 −7
Original line number Diff line number Diff line
@@ -59,9 +59,7 @@ import static android.security.Flags.preventIntentRedirectAbortOrThrowException;
import static android.security.Flags.preventIntentRedirectShowToast;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.TRANSIT_FLAG_AVOID_MOVE_TO_FRONT;
import static android.view.WindowManager.TRANSIT_NONE;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
import static android.window.TaskFragmentOperation.OP_TYPE_START_ACTIVITY_IN_TASK_FRAGMENT;

import static com.android.internal.protolog.WmProtoLogGroups.WM_DEBUG_CONFIGURATION;
@@ -2558,11 +2556,6 @@ class ActivityStarter {
                if (actuallyMoved) {
                    // Only record if the activity actually moved.
                    mMovedToTopActivity = act;
                    if (mNoAnimation) {
                        act.mDisplayContent.prepareAppTransition(TRANSIT_NONE);
                    } else {
                        act.mDisplayContent.prepareAppTransition(TRANSIT_TO_FRONT);
                    }
                }
                act.updateOptionsLocked(mOptions);
                deliverNewIntent(act, intentGrants);
+2 −31
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
import static android.view.WindowManager.REMOVE_CONTENT_MODE_DESTROY;
import static android.view.WindowManager.TRANSIT_CHANGE;
import static android.view.WindowManager.TRANSIT_NONE;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
import static android.view.inputmethod.ImeTracker.DEBUG_IME_VISIBILITY;
@@ -5635,30 +5634,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        mPointerEventDispatcher.unregisterInputEventListener(listener);
    }

    /**
     * @deprecated new transition should use {@link #requestTransitionAndLegacyPrepare(int, int)}
     */
    @Deprecated
    void prepareAppTransition(@WindowManager.TransitionType int transit) {
        prepareAppTransition(transit, 0 /* flags */);
    }

    /**
     * @deprecated new transition should use {@link #requestTransitionAndLegacyPrepare(int, int)}
     */
    @Deprecated
    void prepareAppTransition(@WindowManager.TransitionType int transit,
            @WindowManager.TransitionFlags int flags) {
        mAppTransition.prepareAppTransition(transit, flags);
    }

    /**
     * Helper that both requests a transition (using the new transition system) and prepares
     * the legacy transition system. Use this when both systems have the same start-point.
     *
     * @see TransitionController#requestTransitionIfNeeded(int, int, WindowContainer,
     *      WindowContainer)
     * @see AppTransition#prepareAppTransition
     */
    void requestTransitionAndLegacyPrepare(@WindowManager.TransitionType int transit,
            @WindowManager.TransitionFlags int flags, @Nullable WindowContainer trigger) {
@@ -6546,20 +6527,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            // If keyguard is not locked, the change of flags won't affect activity visibility.
            return;
        }
        // We might change the visibilities here, so prepare an empty app transition which might be
        // overridden later if we actually change visibilities.
        final boolean wasTransitionSet = mAppTransition.isTransitionSet();
        if (!wasTransitionSet) {
            prepareAppTransition(TRANSIT_NONE);
        }
        mRootWindowContainer.ensureActivitiesVisible();

        // If there was a transition set already we don't want to interfere with it as we might be
        // starting it too early.
        if (!wasTransitionSet) {
        // In case there is a visibility change.
        executeAppTransition();
    }
    }

    /**
     * Check if the display has {@link Display#FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD} applied.
Loading