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

Commit 492139a7 authored by chaviw's avatar chaviw
Browse files

Move mFrame and mLastFrame from WindowState to WindowFrames

Test: go/wm-smoke
Bug: 111359087
Change-Id: I10df265a5007a2f61d2b884668646abf4ebe7a74
parent 553b021c
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -288,8 +288,8 @@ message WindowStateProto {
    optional int32 stack_id = 4;
    optional .android.view.WindowLayoutParamsProto attributes = 5;
    optional .android.graphics.RectProto given_content_insets = 6;
    optional .android.graphics.RectProto frame = 7;
    reserved 8 to 10;
    reserved 7 to 10;
//    optional .android.graphics.RectProto frame = 7;
//    optional .android.graphics.RectProto containing_frame = 8;
//    optional .android.graphics.RectProto parent_frame = 9;
//    optional .android.graphics.RectProto content_frame = 10;
@@ -394,8 +394,9 @@ message WindowFramesProto {
    optional .android.graphics.RectProto content_frame = 2;
    optional .android.graphics.RectProto decor_frame = 3;
    optional .android.graphics.RectProto display_frame = 4;
    optional .android.graphics.RectProto outset_frame = 5;
    optional .android.graphics.RectProto overscan_frame = 6;
    optional .android.graphics.RectProto parent_frame = 7;
    optional .android.graphics.RectProto visible_frame = 8;
    optional .android.graphics.RectProto frame = 5;
    optional .android.graphics.RectProto outset_frame = 6;
    optional .android.graphics.RectProto overscan_frame = 7;
    optional .android.graphics.RectProto parent_frame = 8;
    optional .android.graphics.RectProto visible_frame = 9;
}
+3 −2
Original line number Diff line number Diff line
@@ -549,7 +549,8 @@ final class AccessibilityController {
                    touchableRegion.getBounds(touchableFrame);
                    RectF windowFrame = mTempRectF;
                    windowFrame.set(touchableFrame);
                    windowFrame.offset(-windowState.mFrame.left, -windowState.mFrame.top);
                    windowFrame.offset(-windowState.getFrameLw().left,
                            -windowState.getFrameLw().top);
                    matrix.mapRect(windowFrame);
                    Region windowBounds = mTempRegion2;
                    windowBounds.set((int) windowFrame.left, (int) windowFrame.top,
@@ -1222,7 +1223,7 @@ final class AccessibilityController {
            // Move to origin as all transforms are captured by the matrix.
            RectF windowFrame = mTempRectF;
            windowFrame.set(touchableFrame);
            windowFrame.offset(-windowState.mFrame.left, -windowState.mFrame.top);
            windowFrame.offset(-windowState.getFrameLw().left, -windowState.getFrameLw().top);

            // Map the frame to get what appears on the screen.
            Matrix matrix = mTempMatrix;
+5 −4
Original line number Diff line number Diff line
@@ -1523,7 +1523,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
            if (mLetterbox == null) {
                mLetterbox = new Letterbox(() -> makeChildSurface(null));
            }
            mLetterbox.layout(getParent().getBounds(), w.mFrame);
            mLetterbox.layout(getParent().getBounds(), w.getFrameLw());
        } else if (mLetterbox != null) {
            mLetterbox.hide();
        }
@@ -1808,7 +1808,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
            // won't exactly match the final freeform window frame (e.g. when overlapping with
            // the status bar). In that case we need to use the final frame.
            if (freeform) {
                frame.set(win.mFrame);
                frame.set(win.getFrameLw());
            } else if (win.isLetterboxedAppWindow()) {
                frame.set(getTask().getBounds());
            } else if (win.isDockedResizing()) {
@@ -2022,7 +2022,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        if (win == null) {
            return;
        }
        final Rect frame = win.mFrame;
        final Rect frame = win.getFrameLw();
        final int thumbnailDrawableRes = getTask().mUserId == mService.mCurrentUserId
                ? R.drawable.ic_account_circle
                : R.drawable.ic_corp_badge;
@@ -2034,7 +2034,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        }
        mThumbnail = new AppWindowThumbnail(getPendingTransaction(), this, thumbnail);
        final Animation animation =
                mService.mAppTransition.createCrossProfileAppsThumbnailAnimationLocked(win.mFrame);
                mService.mAppTransition.createCrossProfileAppsThumbnailAnimationLocked(
                        win.getFrameLw());
        mThumbnail.startAnimation(getPendingTransaction(), animation, new Point(frame.left,
                frame.top));
    }
+2 −2
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                    w.mAppToken.layoutLetterbox(w);
                }

                if (DEBUG_LAYOUT) Slog.v(TAG, "  LAYOUT: mFrame=" + w.mFrame
                if (DEBUG_LAYOUT) Slog.v(TAG, "  LAYOUT: mFrame=" + w.getFrameLw()
                        + " mContainingFrame=" + w.getContainingFrame()
                        + " mDisplayFrame=" + w.getDisplayFrameLw());
            }
@@ -606,7 +606,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                w.prelayout();
                mService.mPolicy.layoutWindowLw(w, w.getParentWindow(), mDisplayFrames);
                w.mLayoutSeq = mLayoutSeq;
                if (DEBUG_LAYOUT) Slog.v(TAG, " LAYOUT: mFrame=" + w.mFrame
                if (DEBUG_LAYOUT) Slog.v(TAG, " LAYOUT: mFrame=" + w.getFrameLw()
                        + " mContainingFrame=" + w.getContainingFrame()
                        + " mDisplayFrame=" + w.getDisplayFrameLw());
            }
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
        inputWindowHandle.ownerUid = child.mSession.mUid;
        inputWindowHandle.inputFeatures = child.mAttrs.inputFeatures;

        final Rect frame = child.mFrame;
        final Rect frame = child.getFrameLw();
        inputWindowHandle.frameLeft = frame.left;
        inputWindowHandle.frameTop = frame.top;
        inputWindowHandle.frameRight = frame.right;
Loading