WhisperSystems/TextSecure — pull request #1840 by mcginty (2014-08-15 07:37:34+00:00)
Title: opportunistically use Android's E164 cached numbers

The first call (and any calls if libphonenumber decides to clear out its memory cache) to canonicalizeNumber takes 700-950ms on my Nexus 5 due to the amount of metadata being read from disk. This leads to a pretty noticeable delay when opening a conversation sometimes.

This is a proposal that benefits devices on Jelly Bean or higher. Since API 16, Android provides E164 normalized numbers for any contact that has a number specified, and we can take advantage of that.

Before:
![before-compressed](https://cloud.githubusercontent.com/assets/373823/3930910/b87a3c9c-244e-11e4-84bc-c50f17690976.gif)

After:
![after-compressed](https://cloud.githubusercontent.com/assets/373823/3930911/b9cf5ef6-244e-11e4-9963-50b7987fb231.gif)