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

Commit 8fa6503f authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #5233207 android.graphics.cts.PaintTest#testBreakText fails on IRK56F trygon-userdebug

- Paint.breakText() API was regressing on the argument validation: a count < 0 is a valid one

Change-Id: I6d09294ee9f21901ba00017ce0d73f757fc7b147
parent 3efc794f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1349,7 +1349,7 @@ public class Paint {
        if (text == null) {
            throw new IllegalArgumentException("text cannot be null");
        }
        if ((index | count) < 0 || index + count > text.length) {
        if (index < 0 || text.length - index < Math.abs(count)) {
            throw new ArrayIndexOutOfBoundsException();
        }