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

Commit b0c8da05 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

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

Change-Id: I41a66b297fee74e5f2c532e042ea6d9a4a76ae07
parents 2d56c9fc 755dc09d
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -954,8 +954,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
@@ -253,6 +253,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
@@ -1189,6 +1189,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo

        activity.onRemovedFromDisplay();
        if (activity == mFixedRotationLaunchingApp) {
            // Make sure the states of associated tokens are also cleared.
            activity.finishFixedRotationTransform();
            setFixedRotationLaunchingAppUnchecked(null);
        }
    }
@@ -1487,6 +1489,12 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                // 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;
@@ -2310,6 +2318,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
    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
@@ -3011,11 +3026,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo

        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
@@ -1864,14 +1864,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