History log of /packages/apps/Contacts/src/com/android/contacts/util/PhoneNumberFormatter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ede69077adc84449a29af3e8869a125baecf5856 29-Sep-2011 Makoto Onuki <omakoto@google.com> Fix as-you-type formatter for new contacts

It looks like for new contacts onPostExecute() gets executed
before the target view is attacheed.

Removed the "is view attached?" check, as addTextChangedListener()
is actually safe to call even if the target view is not attached.

Bug 5362018
Bug 5385441

Change-Id: I178063c4e061fdcab27e25b9dfdc7fe25fd97153
/packages/apps/Contacts/src/com/android/contacts/util/PhoneNumberFormatter.java
e598332967106e3db63b73c701f21902d169efef 27-Aug-2011 Makoto Onuki <omakoto@google.com> Don't preload AsYouTypeFormatter

- This took 200ms of startup time at least, and a lot more under heavy load,
especially when the flash is busy. (200ms is mostly disk I/O.)

- Instead, make sure we always use AsyncTask to create
PhoneNumberFormattingTextWatcher, which wass the only thing that uses
AsYouTypeFormatter.

- DialpadFragment already had an AsnycTask. Moved it to the new class UiUtils
and use it in TextFieldsEditorView, which is the only other callsite.

- Also improved the logging for account loading. We used to log only CPU
time, but what we really care is the actual wall time. Because
account loading involves a lot of file access (e.g. loading 3rd party
apks), only measuring CPU time is not too useful.
(In fact, on my phone, loading accounts takes only 50ms CPU time but
>500ms wall time.)

Bug 5195464

Change-Id: I2b51e864d75831bdbb9e424aa846133d49d6ef94
/packages/apps/Contacts/src/com/android/contacts/util/PhoneNumberFormatter.java