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

Commit a66abab5 authored by Jorge Betancourt's avatar Jorge Betancourt
Browse files

fix javadocs for get/set Matrix44

Test: none
Bug:326419633

Change-Id: Ice4df6676dafc1e0e1bbc27dd587506c374432cc
parent 3da1c926
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -16363,7 +16363,7 @@ package android.graphics {
    ctor @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public Matrix44();
    ctor @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public Matrix44(@NonNull android.graphics.Matrix);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") @NonNull public android.graphics.Matrix44 concat(@NonNull android.graphics.Matrix44);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public float get(int, int);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public float get(@IntRange(from=0, to=3) int, @IntRange(from=0, to=3) int);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public void getValues(@NonNull float[]);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public boolean invert();
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public boolean isIdentity();
@@ -16372,7 +16372,7 @@ package android.graphics {
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public void reset();
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") @NonNull public android.graphics.Matrix44 rotate(float, float, float, float);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") @NonNull public android.graphics.Matrix44 scale(float, float, float);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public void set(int, int, float);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public void set(@IntRange(from=0, to=3) int, @IntRange(from=0, to=3) int, float);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") public void setValues(@NonNull float[]);
    method @FlaggedApi("com.android.graphics.hwui.flags.matrix_44") @NonNull public android.graphics.Matrix44 translate(float, float, float);
  }
+8 −6
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.graphics;

import android.annotation.FlaggedApi;
import android.annotation.IntRange;
import android.annotation.NonNull;

import com.android.graphics.hwui.flags.Flags;
@@ -98,11 +99,11 @@ public class Matrix44 {
    /**
     * Gets the value at the matrix's row and column.
     *
     * @param row An integer from 0 to 4 indicating the row of the value to get
     * @param col An integer from 0 to 4 indicating the column of the value to get
     * @param row An integer from 0 to 3 indicating the row of the value to get
     * @param col An integer from 0 to 3 indicating the column of the value to get
     */
    @FlaggedApi(Flags.FLAG_MATRIX_44)
    public float get(int row, int col) {
    public float get(@IntRange(from = 0, to = 3) int row, @IntRange(from = 0, to = 3) int col) {
        if (row >= 0 && row < 4 && col >= 0 && col < 4) {
            return mBackingArray[row * 4 + col];
        }
@@ -112,12 +113,13 @@ public class Matrix44 {
    /**
     * Sets the value at the matrix's row and column to the provided value.
     *
     * @param row An integer from 0 to 4 indicating the row of the value to change
     * @param col An integer from 0 to 4 indicating the column of the value to change
     * @param row An integer from 0 to 3 indicating the row of the value to change
     * @param col An integer from 0 to 3 indicating the column of the value to change
     * @param val The value the element at the specified index will be set to
     */
    @FlaggedApi(Flags.FLAG_MATRIX_44)
    public void set(int row, int col, float val) {
    public void set(@IntRange(from = 0, to = 3) int row, @IntRange(from = 0, to = 3) int col,
            float val) {
        if (row >= 0 && row < 4 && col >= 0 && col < 4) {
            mBackingArray[row * 4 + col] = val;
        } else {