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

Commit 30794944 authored by John Reck's avatar John Reck
Browse files

Throw IAE on invalid scale

 Bug: 16565964

Change-Id: I0cc35c532b42433381e1ae7f350c95ecbb4d09c3
parent ea4f0107
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -597,6 +597,9 @@ public class RenderNode {
     * @see #getScaleX()
     */
    public boolean setScaleX(float scaleX) {
        if (scaleX > 1000000) {
            throw new IllegalArgumentException("Invalid scale: " + scaleX);
        }
        return nSetScaleX(mNativeRenderNode, scaleX);
    }

@@ -618,6 +621,9 @@ public class RenderNode {
     * @see #getScaleY()
     */
    public boolean setScaleY(float scaleY) {
        if (scaleY > 1000000) {
            throw new IllegalArgumentException("Invalid scale: " + scaleY);
        }
        return nSetScaleY(mNativeRenderNode, scaleY);
    }