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

Commit b3a54f91 authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Android (Google) Code Review
Browse files

Merge "Change WindowState.mShownFrame to WindowState.mShownPosition."

parents 96a0cb21 2a6a2c2d
Loading
Loading
Loading
Loading
+74 −73
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Bundle;
@@ -174,12 +175,12 @@ public interface WindowManagerPolicy {
        public Rect getFrameLw();

        /**
         * Retrieve the current frame of the window that is actually shown.
         * Retrieve the current position of the window that is actually shown.
         * Must be called with the window manager lock held.
         *
         * @return Rect The rectangle holding the shown window frame.
         * @return Point The point holding the shown window position.
         */
        public RectF getShownFrameLw();
        public Point getShownPositionLw();

        /**
         * Retrieve the frame of the display that this window was last
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package android.graphics;
import android.os.Parcel;
import android.os.Parcelable;

import java.io.PrintWriter;


/**
 * Point holds two integer coordinates
@@ -95,6 +97,11 @@ public class Point implements Parcelable {
        return "Point(" + x + ", " + y + ")";
    }

    /** @hide */
    public void printShortString(PrintWriter pw) {
        pw.println("["); pw.print(x); pw.print(","); pw.print(y); pw.print("]");
    }

    /**
     * Parcelable interface methods
     */
+2 −1
Original line number Diff line number Diff line
@@ -4614,7 +4614,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                final int fl = PolicyControl.getWindowFlags(null, lp);
                if (localLOGV) {
                    Slog.d(TAG, "frame: " + mTopFullscreenOpaqueWindowState.getFrameLw()
                            + " shown frame: " + mTopFullscreenOpaqueWindowState.getShownFrameLw());
                            + " shown position: "
                            + mTopFullscreenOpaqueWindowState.getShownPositionLw());
                    Slog.d(TAG, "attr: " + mTopFullscreenOpaqueWindowState.getAttrs()
                            + " lp.flags=0x" + Integer.toHexString(fl));
                }
+2 −2
Original line number Diff line number Diff line
@@ -206,8 +206,8 @@ final class AccessibilityController {
        sTempFloats[Matrix.MSKEW_Y] = windowState.mWinAnimator.mDtDx;
        sTempFloats[Matrix.MSKEW_X] = windowState.mWinAnimator.mDsDy;
        sTempFloats[Matrix.MSCALE_Y] = windowState.mWinAnimator.mDtDy;
        sTempFloats[Matrix.MTRANS_X] = windowState.mShownFrame.left;
        sTempFloats[Matrix.MTRANS_Y] = windowState.mShownFrame.top;
        sTempFloats[Matrix.MTRANS_X] = windowState.mShownPosition.x;
        sTempFloats[Matrix.MTRANS_Y] = windowState.mShownPosition.y;
        sTempFloats[Matrix.MPERSP_0] = 0;
        sTempFloats[Matrix.MPERSP_1] = 0;
        sTempFloats[Matrix.MPERSP_2] = 1;
+1 −1
Original line number Diff line number Diff line
@@ -419,7 +419,7 @@ class WallpaperController {
                    winAnimator.computeShownFrameLocked();
                    // No need to lay out the windows - we can just set the wallpaper position
                    // directly.
                    winAnimator.setWallpaperOffset(wallpaper.mShownFrame);
                    winAnimator.setWallpaperOffset(wallpaper.mShownPosition);
                    // We only want to be synchronous with one wallpaper.
                    sync = false;
                }
Loading