Move DateFormat.zeroPad() back to upstream.

We can only safely use TextUtils.formatSimple() when formatting
strings that don't appear in UI, since locales can use different
glyphs for representing numerals.

Bug: 174576537
Test: manual
Exempt-From-Owner-Approval: revert
Change-Id: Iafba1ccde239e3053b2a462c3d0c248795fbf5fc
This commit is contained in:
Jeff Sharkey
2020-12-02 14:01:15 -07:00
committed by Jeff Sharkey
parent a01f750588
commit c9a074da58

View File

@@ -698,7 +698,7 @@ public class DateFormat {
}
private static String zeroPad(int inValue, int inMinDigits) {
return TextUtils.formatSimple("%0" + inMinDigits + "d", inValue);
return String.format(Locale.getDefault(), "%0" + inMinDigits + "d", inValue);
}
/**