Fix crashes associated with new logic to replace entire address with name + address

Fixes b/7257614 crash when replying to a message

Change-Id: I6dcda376073f941fba4b09a647bdb00a92e4ccce
Add comments to the recipientedittextview replace code.

makes it easier for others to debug/ review

Change-Id: Icdcbaa9074c81ef33943b24e8e0b544513360d8a
Make sure we check the most up to date text for the token offsets.

The issue here was that we were using the old version of the editable string
(cached in var text) to look for the start/end of tokens, but the result
of calling commitChip may have updated the text (added corrective rfc822
formatting, or a display name)

Fixes b/7268603 [Manta] List of email addresses pasted into the To field is broken

Change-Id: Iccc8dbf78a018c84fd818582d10ff2b02a787276
Set the scale type for the default image icon

By setting the scale type to center, the default icon
is not scaled up.

Bug: 7298245
Bug: 7340457
Change-Id: I66200a1c751ca80e878e55a7b9daa656a6cbe98d
merge in jb-mr1-factory-release history after reset to jb-mr1-dev
Load preview first

If the preview is available, load the it first, while
waiting for the full size image to load

Bug: 7340082
Bug: 7298245
Change-Id: I64934001d832844a776f8d9c1f2abcece552f79c
merge in jb-mr1-factory-release history after reset to jb-mr1-dev
Restart loader on attachment cursor updates

Bug: 7403076
Change-Id: I620403db9f7304e99ca4e9c0c58a439e277225d0
Show old results

Keep showing old recipient results when no local results are returned,
if we are waiting for server results

Bug: 7407129
Change-Id: If495ff6437da064206923dc95ee61b7a4f19c2f3
Fix for panorama icon not always showing up in photo viewer.

Bug: 7392422
Change-Id: Ifff054c86366eb0b495a06ead9e0dc60123e90c4
Reset maxlines when the user expands text

To avoid an initial jump when changing over a possibly large numbers of contacts to chips,
start with maxlines of 2 from some apps, and eliminate this when the user chooses to expand.

Part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I5c8cd5c1569befa28a67ddb1f4153e03e896c25a
Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge

Change-Id: I5a840e438bae2f51286a4596060a1021215182cb
Update chips to follow new ux spec for replacement

Part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I2f3c63f555143c66b3d4f466b60e0ca884d6302b
Make sure that the last "fake entry" chip is correctly committed

Fix logic to correctly determine that this "recipient chip" is really
text

Fixes part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I4c5244581a4fce5de58d6d9c510e1df16674c338
Make sure that we take the existng temporary contact, where available.

Temporary contact entry will give us display name and address if it has it
when there is no contact match

Fixes part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: Id5cf6b770d1179c81d9c9b808af4681e632d18a7
am 06208d07: cherrypick: Reset maxlines when the user expands text

* commit '06208d075bdc260410847806300fd5fcd8c43b49':
  cherrypick: Reset maxlines when the user expands text
am 797b22f9: Merge changes to chips from unbundled branch: update behavior to match new ux spec

* commit '797b22f945b65ecebbf86e45265f9403f6ff257c':
  Merge changes to chips from unbundled branch: update behavior to match new ux spec
Reconcile with jb-mr1-release - do not merge

Change-Id: Ib03c9a05d1f9d755dea8c93beb270b1eae04ea0b
Reconcile with jb-mr1-release - do not merge

Change-Id: Ie06c8378e80e9d7c74b6cada9c7cbac06aaa3d20
dont replace the text in the text field when editing a fake or generated entry

We are editing the entire text in there, and that includes the display name
and any other information...so just remove the span
This means we dont trigger a text change that triggers a scroll
Fixes b/7499873 Odd scroll when touch non-contact chips with quote text enabled

Change-Id: I0c537e7fec663abe3cec96a5b59bc52caa009a30