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

Commit 4189e0f7 authored by Glenn Maynard's avatar Glenn Maynard Committed by Steve Kondik
Browse files

Fix Color.parseColor throws StringIndexOutOfBoundsException.

It should throw IllegalArgumentException.  Fixes FC in the dialer when
an invalid custom digit color is set.
parent b15d5daa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ public class Color {
     * 'yellow', 'lightgray', 'darkgray'
     */
    public static int parseColor(String colorString) {
        if (colorString.charAt(0) == '#') {
        if (colorString.startsWith("#")) {
            // Use a long to avoid rollovers on #ffXXXXXX
            long color = Long.parseLong(colorString.substring(1), 16);
            if (colorString.length() == 7) {