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

Commit 0f72747c authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am 984add52: Merge "Return a copy of the read-only identity Matrix"

# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit '984add52':
  Return a copy of the read-only identity Matrix
parents b10c0f97 984add52
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -562,13 +562,14 @@ public class ImageView extends View {

    /** Return the view's optional matrix. This is applied to the
        view's drawable when it is drawn. If there is not matrix,
        this method will return null.
        Do not change this matrix in place. If you want a different matrix
        applied to the drawable, be sure to call setImageMatrix().
        this method will return an identity matrix.
        Do not change this matrix in place but make a copy.
        If you want a different matrix applied to the drawable,
        be sure to call setImageMatrix().
    */
    public Matrix getImageMatrix() {
        if (mDrawMatrix == null) {
            return Matrix.IDENTITY_MATRIX;
            return new Matrix(Matrix.IDENTITY_MATRIX);
        }
        return mDrawMatrix;
    }