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

Commit a6e994b7 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Fix extra configuration change when unlocking directly" into rvc-dev...

Merge "Fix extra configuration change when unlocking directly" into rvc-dev am: 54e3542b am: a35ab288 am: 755dc09d am: b0c8da05

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

Change-Id: I5a4085966f08b46e325b90567fc6facac978ebdc
parents 3602c049 b0c8da05
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -925,8 +925,6 @@ class ActivityStack extends Task {
    void awakeFromSleepingLocked() {
        // Ensure activities are no longer sleeping.
        forAllActivities((Consumer<ActivityRecord>) (r) -> r.setSleeping(false));
        ensureActivitiesVisible(null /* starting */, 0 /* configChanges */,
                false /* preserveWindows */);
        if (mPausingActivity != null) {
            Slog.d(TAG, "awakeFromSleepingLocked: previously pausing activity didn't pause");
            mPausingActivity.activityPaused(true);
+1 −0
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> {
                    req = mLastKeyguardForcedOrientation;
                }
            }
            mLastOrientationSource = win;
            return req;
        }
    }
+16 −3
Original line number Diff line number Diff line
@@ -1170,6 +1170,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp

        activity.onRemovedFromDisplay();
        if (activity == mFixedRotationLaunchingApp) {
            // Make sure the states of associated tokens are also cleared.
            activity.finishFixedRotationTransform();
            setFixedRotationLaunchingAppUnchecked(null);
        }
    }
@@ -1468,6 +1470,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                // window was transferred ({@link #mSkipAppTransitionAnimation}).
                return false;
            }
            if ((mAppTransition.getTransitFlags()
                    & WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION) != 0) {
                // The transition may be finished before keyguard hidden. In order to avoid the
                // intermediate orientation change, it is more stable to freeze the display.
                return false;
            }
        } else if (r != topRunningActivity()) {
            // If the transition has not started yet, the activity must be the top.
            return false;
@@ -2291,6 +2299,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    void onAppTransitionDone() {
        super.onAppTransitionDone();
        mWmService.mWindowsChanged = true;
        // If the transition finished callback cannot match the token for some reason, make sure the
        // rotated state is cleared if it is already invisible.
        if (mFixedRotationLaunchingApp != null && !mFixedRotationLaunchingApp.mVisibleRequested
                && !mFixedRotationLaunchingApp.isVisible()
                && !mDisplayRotation.isRotatingSeamlessly()) {
            clearFixedRotationLaunchingApp();
        }
    }

    @Override
@@ -2952,11 +2967,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp

        final ScreenRotationAnimation rotationAnimation = getRotationAnimation();
        if (rotationAnimation != null) {
            pw.print(subPrefix);
            pw.println("  mScreenRotationAnimation:");
            rotationAnimation.printTo("  ", pw);
            rotationAnimation.printTo(subPrefix, pw);
        } else if (dumpAll) {
            pw.print(subPrefix);
            pw.println("  no ScreenRotationAnimation ");
        }

+6 −0
Original line number Diff line number Diff line
@@ -2391,6 +2391,12 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
                            // activity here.
                            resumeFocusedStacksTopActivities();
                        }
                        // The visibility update must not be called before resuming the top, so the
                        // display orientation can be updated first if needed. Otherwise there may
                        // have redundant configuration changes due to apply outdated display
                        // orientation (from keyguard) to activity.
                        stack.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */,
                                false /* preserveWindows */);
                    }
                }
            }
+4 −4
Original line number Diff line number Diff line
@@ -1859,14 +1859,14 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> {
    @Override
    void dump(PrintWriter pw, String prefix, boolean dumpAll) {
        pw.println(prefix + "TaskDisplayArea " + getName());
        super.dump(pw, prefix, dumpAll);
        final String doublePrefix = prefix + "  ";
        super.dump(pw, doublePrefix, dumpAll);
        if (mPreferredTopFocusableStack != null) {
            pw.println(prefix + "  mPreferredTopFocusableStack=" + mPreferredTopFocusableStack);
            pw.println(doublePrefix + "mPreferredTopFocusableStack=" + mPreferredTopFocusableStack);
        }
        if (mLastFocusedStack != null) {
            pw.println(prefix + "  mLastFocusedStack=" + mLastFocusedStack);
            pw.println(doublePrefix + "mLastFocusedStack=" + mLastFocusedStack);
        }
        final String doublePrefix = prefix + "  ";
        final String triplePrefix = doublePrefix + "  ";
        pw.println(doublePrefix + "Application tokens in top down Z order:");
        for (int stackNdx = getChildCount() - 1; stackNdx >= 0; --stackNdx) {
Loading