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

Commit 484c8a28 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 2531732 - DateTimeView explodes on bad system date format."

parents 395f5126 f3311c94
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -206,7 +206,12 @@ public class DateTimeView extends TextView {
        if (format == null || "".equals(format)) {
            return DateFormat.getDateInstance(DateFormat.SHORT);
        } else {
            try {
                return new SimpleDateFormat(format);
            } catch (IllegalArgumentException e) {
                // If we tried to use a bad format string, fall back to a default.
                return DateFormat.getDateInstance(DateFormat.SHORT);
            }
        }
    }