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

Commit 0ab05452 authored by Melody Hsu's avatar Melody Hsu Committed by Android (Google) Code Review
Browse files

Merge "Revert "Check preconditions for position and matrix for txs"" into main

parents 9d463e70 4967e0fc
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -3380,8 +3380,7 @@ public final class SurfaceControl implements Parcelable {

        /**
         * Sets the SurfaceControl to the specified position relative to the parent
         * SurfaceControl. Assumes that the position values are finite. Otherwise, an
         * exception is thrown.
         * SurfaceControl
         *
         * @param sc The SurfaceControl to change position
         * @param x the X position
@@ -3391,8 +3390,6 @@ public final class SurfaceControl implements Parcelable {
        @NonNull
        public Transaction setPosition(@NonNull SurfaceControl sc, float x, float y) {
            checkPreconditions(sc);
            Preconditions.checkArgument(Float.isFinite(x), "Infinite x position");
            Preconditions.checkArgument(Float.isFinite(y), "Infinite y position");
            if (SurfaceControlRegistry.sCallStackDebuggingEnabled) {
                SurfaceControlRegistry.getProcessInstance().checkCallStackDebugging(
                        "setPosition", this, sc, "x=" + x + " y=" + y);
@@ -3629,10 +3626,6 @@ public final class SurfaceControl implements Parcelable {
        public Transaction setMatrix(SurfaceControl sc,
                float dsdx, float dtdx, float dtdy, float dsdy) {
            checkPreconditions(sc);
            Preconditions.checkArgument(Float.isFinite(dsdx), "Infinite matrix dsdx");
            Preconditions.checkArgument(Float.isFinite(dtdx), "Infinite matrix dtdx");
            Preconditions.checkArgument(Float.isFinite(dtdy), "Infinite matrix dtdy");
            Preconditions.checkArgument(Float.isFinite(dsdy), "Infinite matrix dsdy");
            if (SurfaceControlRegistry.sCallStackDebuggingEnabled) {
                SurfaceControlRegistry.getProcessInstance().checkCallStackDebugging(
                        "setMatrix", this, sc,
@@ -3645,7 +3638,7 @@ public final class SurfaceControl implements Parcelable {

        /**
         * Sets the transform and position of a {@link SurfaceControl} from a 3x3 transformation
         * matrix. Assumes that the matrix values are finite. Otherwise, an exception is thrown.
         * matrix.
         *
         * @param sc     SurfaceControl to set matrix of
         * @param matrix The matrix to apply.