History log of /frameworks/base/core/java/android/text/format/TimeFormatter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
16566656cd2f81f62c8693e64de68062f2680161 27-Aug-2014 Neil Fuller <nfuller@google.com> Fixing android.text.format.Time for non-English locales

The test fixes for bug 17262063 showed up a real issue for
non-English locales with the Time.format() method:
If the Android string resources that contain the pattern use
non-ASCII characters then a '?' would be output instead of
those characters.

For example, in France the pattern for '%c' includes a 'à'
(a with a grave accent) and Japan includes 日.

The problem was due to converting the pattern to bytes using
the US_ASCII character set, which turns non-ASCII characters
into '?'. The code has been changed to use char throughout
and avoid bytes.

Internal documentation has been improved.

Some calls to modifyAndAppend() have been replaced with a
direct call to outputBuilder.append() because the
modify step is guaranteed to a no-op for the literals given.

The formatter has been changed to use Locale.US because it
is only used for outputting numbers. It has been renamed
to make this more obvious and the locale field has been
removed.

Bug: 17262063

(cherry picked from commit 788cb18f652fca380acefdadce305415bc0602b0)

Change-Id: I96ee158fbeb01827f0bbf022631625416f872fdb
/frameworks/base/core/java/android/text/format/TimeFormatter.java
3b852e3489e995600fce19dfdbf3a5d769374d74 25-Jun-2014 Neil Fuller <nfuller@google.com> Rewriting android.text.format.Time without the native _tz functions

(cherry picked from commit d7f0849b8c053ccc6abf0dc7d5bc07da502782a4)
Bug: 15765976

Change-Id: I00f72bd1043ef20f22d25559206b2f741334ba9c
/frameworks/base/core/java/android/text/format/TimeFormatter.java