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

Commit e0b66c29 authored by Robert Carr's avatar Robert Carr Committed by android-build-merger
Browse files

Also report resize when frame changes without inset change.

am: 31aa98be

Change-Id: I5fc3849b92a4ff13cf76a6e23298612fa48a2798
parents 820d1910 31aa98be
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -9425,7 +9425,7 @@ public class WindowManagerService extends IWindowManager.Stub
            if (task != null && task.mStack.getBoundsAnimating()) {
            if (task != null && task.mStack.getBoundsAnimating()) {
                return;
                return;
            }
            }
            w.setInsetsChanged();
            w.setReportResizeHints();
            boolean configChanged = w.isConfigChanged();
            boolean configChanged = w.isConfigChanged();
            if (DEBUG_CONFIGURATION && configChanged) {
            if (DEBUG_CONFIGURATION && configChanged) {
                Slog.v(TAG_WM, "Win " + w + " config changed: "
                Slog.v(TAG_WM, "Win " + w + " config changed: "
@@ -9437,11 +9437,11 @@ public class WindowManagerService extends IWindowManager.Stub
                    + ": configChanged=" + configChanged
                    + ": configChanged=" + configChanged
                    + " dragResizingChanged=" + dragResizingChanged
                    + " dragResizingChanged=" + dragResizingChanged
                    + " last=" + w.mLastFrame + " frame=" + w.mFrame);
                    + " last=" + w.mLastFrame + " frame=" + w.mFrame);
            w.mLastFrame.set(w.mFrame);
            if (w.mContentInsetsChanged
            if (w.mContentInsetsChanged
                    || w.mVisibleInsetsChanged
                    || w.mVisibleInsetsChanged
                    || winAnimator.mSurfaceResized
                    || winAnimator.mSurfaceResized
                    || w.mOutsetsChanged
                    || w.mOutsetsChanged
                    || w.mFrameSizeChanged
                    || configChanged
                    || configChanged
                    || dragResizingChanged
                    || dragResizingChanged
                    || !w.isResizedWhileNotDragResizingReported()) {
                    || !w.isResizedWhileNotDragResizingReported()) {
@@ -9474,6 +9474,7 @@ public class WindowManagerService extends IWindowManager.Stub
                w.mLastVisibleInsets.set(w.mVisibleInsets);
                w.mLastVisibleInsets.set(w.mVisibleInsets);
                w.mLastStableInsets.set(w.mStableInsets);
                w.mLastStableInsets.set(w.mStableInsets);
                w.mLastOutsets.set(w.mOutsets);
                w.mLastOutsets.set(w.mOutsets);
                w.mLastFrame.set(w.mFrame);
                makeWindowFreezingScreenIfNeededLocked(w);
                makeWindowFreezingScreenIfNeededLocked(w);
                // If the orientation is changing, or we're starting or ending
                // If the orientation is changing, or we're starting or ending
                // a drag resizing action, then we need to hold off on unfreezing
                // a drag resizing action, then we need to hold off on unfreezing
+6 −2
Original line number Original line Diff line number Diff line
@@ -287,6 +287,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
    // "Real" frame that the application sees, in display coordinate space.
    // "Real" frame that the application sees, in display coordinate space.
    final Rect mFrame = new Rect();
    final Rect mFrame = new Rect();
    final Rect mLastFrame = new Rect();
    final Rect mLastFrame = new Rect();
    boolean mFrameSizeChanged = false;
    // Frame that is scaled to the application's coordinate space when in
    // Frame that is scaled to the application's coordinate space when in
    // screen size compatibility mode.
    // screen size compatibility mode.
    final Rect mCompatFrame = new Rect();
    final Rect mCompatFrame = new Rect();
@@ -1055,14 +1056,16 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        return mAppToken != null && mAppToken.voiceInteraction;
        return mAppToken != null && mAppToken.voiceInteraction;
    }
    }


    boolean setInsetsChanged() {
    boolean setReportResizeHints() {
        mOverscanInsetsChanged |= !mLastOverscanInsets.equals(mOverscanInsets);
        mOverscanInsetsChanged |= !mLastOverscanInsets.equals(mOverscanInsets);
        mContentInsetsChanged |= !mLastContentInsets.equals(mContentInsets);
        mContentInsetsChanged |= !mLastContentInsets.equals(mContentInsets);
        mVisibleInsetsChanged |= !mLastVisibleInsets.equals(mVisibleInsets);
        mVisibleInsetsChanged |= !mLastVisibleInsets.equals(mVisibleInsets);
        mStableInsetsChanged |= !mLastStableInsets.equals(mStableInsets);
        mStableInsetsChanged |= !mLastStableInsets.equals(mStableInsets);
        mOutsetsChanged |= !mLastOutsets.equals(mOutsets);
        mOutsetsChanged |= !mLastOutsets.equals(mOutsets);
        mFrameSizeChanged |= (mLastFrame.width() != mFrame.width()) ||
                (mLastFrame.height() != mFrame.height());
        return mOverscanInsetsChanged || mContentInsetsChanged || mVisibleInsetsChanged
        return mOverscanInsetsChanged || mContentInsetsChanged || mVisibleInsetsChanged
                || mOutsetsChanged;
                || mOutsetsChanged || mFrameSizeChanged;
    }
    }


    public DisplayContent getDisplayContent() {
    public DisplayContent getDisplayContent() {
@@ -2344,6 +2347,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            mVisibleInsetsChanged = false;
            mVisibleInsetsChanged = false;
            mStableInsetsChanged = false;
            mStableInsetsChanged = false;
            mOutsetsChanged = false;
            mOutsetsChanged = false;
            mFrameSizeChanged = false;
            mResizedWhileNotDragResizingReported = true;
            mResizedWhileNotDragResizingReported = true;
            mWinAnimator.mSurfaceResized = false;
            mWinAnimator.mSurfaceResized = false;
        } catch (RemoteException e) {
        } catch (RemoteException e) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -974,7 +974,7 @@ class WindowSurfacePlacer {
            // windows, since that means "perform layout as normal,
            // windows, since that means "perform layout as normal,
            // just don't display").
            // just don't display").
            if (!gone || !win.mHaveFrame || win.mLayoutNeeded
            if (!gone || !win.mHaveFrame || win.mLayoutNeeded
                    || ((win.isConfigChanged() || win.setInsetsChanged())
                    || ((win.isConfigChanged() || win.setReportResizeHints())
                            && !win.isGoneForLayoutLw() &&
                            && !win.isGoneForLayoutLw() &&
                            ((win.mAttrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0 ||
                            ((win.mAttrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0 ||
                            (win.mHasSurface && win.mAppToken != null &&
                            (win.mHasSurface && win.mAppToken != null &&