History log of /packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd321f65f1e50409812976380ad1f0fdb3fa35cb 28-Oct-2013 Yorke Lee <yorkelee@google.com> Move ContactLoader related code to ContactsCommon

This CL simply moves classes from Contacts into ContactsCommon.

This is needed so that Dialer can use ContactLoader related code
for b/11294679. A ContactLoader will also be needed in the future
to allow InCallUI to download hi-res photos while in call.
Bug: 11294679

Change-Id: Ia033f3ea2406a907a4e71290c9ce810a5583dab8
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
738ff8623dc77dd91a1b9023861e924ba5e4c27e 30-Nov-2012 Chiao Cheng <chiaocheng@google.com> Move ValuesDelta to ContactsCommon.

Bug: 6993891
Change-Id: I8b065c55100a152f72cccea5b62f10a8e30161c2
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
aa690d4949b8105e5bcf10569b7cf4fae36741de 29-Nov-2012 Chiao Cheng <chiaocheng@google.com> Prefactor RawContactDelta.ValuesDelta into top level class.

Making ValuesDelta into top level class so we do not have to move
RawContactDelta into ContactsCommon. ValuesDelta is used by
CustomContactListFilterActivity which needs to be moved.

Bug: 6993891
Change-Id: If7371cf08ac0e14218fb790c96856e971fa613ec
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
428f008513d1591cc08fcfe2cf0c9237fb313241 14-Nov-2012 Chiao Cheng <chiaocheng@google.com> Move dependencies of AccountTypeManager into ContactsCommon.

Moving dependencies in preparation to move AccountTypeManager.

Bug: 6993891
Change-Id: I804cdbe64b9b8111ed286037943d593e11dc4044
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
851222a96b5d68602fb361ea3527101e893f67e3 21-Jun-2012 Maurice Chu <mochu@google.com> Added thin object layer around contact data

This refactoring abstracts out the need to directly
refer to Contacts database columns throughout the code. Instead,
all of this information is retained in getter/setter methods
within the Contact, RawContact, and DataItem classes and
sub-classes.

ContactLoader.Result class has been pulled to the top level as
the Contact class.

The Entity class has been removed and replaced with a RawContact
class, with getters/setters to raw contact information.
Renamed EntityDelta to RawContactDelta for better understandability
as well as adding getters/setters for specific fields in the
ValuesDelta nested class within EntityDelta. EntityDeltaList
and EntityModifier have been renamed to RawContactDeltaList and
RawContactModifier with the methods using the RawContact class
directly rather than the Entity class.

Data items for a raw contact are represented by a DataItem object
with specialized getters/setters for subclasses of DataItem.
(e.g., EmailDataItem, PhoneDataItem. etc.). DataItem is a wrapper
around ContentValues. This abstracts away the ContactsContract
column fields into getters/setters.

The above refactoring is accompanied with changes throughout the
codebase to use the new Contact, RawContact, and DataItem classes.

Change-Id: I31c1dccd724e9652f9d0af78ca81feb6c5acd71d
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
e0b2f1e2d01d1ac52ba207dc7ce76971d853298e 12-Jun-2012 Chiao Cheng <chiaocheng@google.com> Global import order fix.

Changed import order to be in accordance with style guide:
http://source.android.com/source/code-style.html#order-import-statements

Static imports will be placed at the top since most existing files used that
convention. It is also a style that can be handled by both eclipse and intellij.

Change-Id: Ia7013c7a2d88e5fefb8f4975d121f7fcd3fcc462
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
740552201d103b80bc49ea8a39a30536222672ea 27-Apr-2012 Daniel Lehmann <lehmannd@google.com> Don't show triangle and on-press state if there is no action

Bug:5265514
Change-Id: Ifc1d3b765f909f0ec7cc7565b9d89de50c4a5549
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
e5d3f897689c8ba0f275c7679c72eacb190ae9b8 11-Apr-2012 Josh Gargus <jjosh@google.com> Fix regression; once again we can apply Gallery photo to contact.

The changes to support hi-res photos in Ic0cabaa5 were not applied to
AttachPhotoActivity. This CL makes the analogous changes, and many other
cleanups besides.

In addition, applying the Gallery photo works even if the AttachPhotoActivity
is killed (eg: when selecting a contact, or when cropping the photo); this
didn't work even before the regression.

The save-contact Intent which invokes the ContactSaveService no longer
needs to specify a callback Activity (it is OK to pass null if you don't
care about getting a callback).

The subclasses of PhotoSelectionHandler have been significantly simplified,
partly by pushing common behavior to the superclass, and also by directly
accessing state in their outer class instead making their own copies.

ContactLoader.Result.getEntityDeltaList() is a new instance method that
replaces more verbose incantations.

New utility class, ContactPhotoUtils. Helps with compressing Bitmaps, and
generating temp-file names used when saving hi-res photos to a contact.

Bug: 6298601
Change-Id: I2fe90c33c9fa81716f263d82ed80c0d6f63c6a7e
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
764637aba745612a9fdc07adb99c615263916fa8 04-Apr-2012 Josh Gargus <jjosh@google.com> Allow setting photo on otherwise-empty local contacts.

Fix bug in ContactEditorFragment where, after tapping "Done",
the contact's photo is still unset. This regression is due to
the changes to support high-res photos... now that we use a
side-channel to save the photo, the EntityDeltaList doesn't
know about the change. The fix is to also create a thumbnail
and add it to the delta-list. This allows us to avoid ugly
special-case code in the editor and save-service. The high-res
photo is still saved via the same side-channel.

Bug: 6109553
Change-Id: I59bb9885eeb0260861ee167d3b5f1c7319896488
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
26918da1650c1ff7b6f92deb978ab976525c811a 03-Feb-2012 Josh Gargus <jjosh@google.com> Contact-editor now immediately shows proper editor for new fields.

Previously, when adding a new field via "Add new" or "Add another
field", an empty field appeared, but the user couldn't edit its
contents without first tapping on it. Now the approperiate editor
UI pops up immediately (eg: when you add a new "event", a date-picker
pops up).

Bug: 5070818
Change-Id: I882a8202a6a76f73f3efd24734b0e0acdbcecac0
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
e692e010ca02200087997280e7c239ebf94aa8f9 18-Jan-2012 Josh Gargus <jjosh@google.com> Support for high-resolution contact photos.

Rather than getting a bitmap directly from the gallery app, with
this change we create a temporary file and request that the photo
be stored there. This avoids running into bundle size limits when
passing large, uncompressed bitmaps back from the gallery.

After reading the photo out into the Contacts app, we use the
openAssetFile API to stream the large photo data into the
Contacts Provider. Note that we do this rather than having Gallery
write directly to the provider because we have no guarantee that
the Gallery (or substitute) app has WRITE_CONTACTS permission.

In the Contact Editor, the image is not permanently stored until
the contact is saved. This avoids needing special logic to handle
the case where the contact is newly-created.

Fix bug 5907233 en passant... the vestiges of some partially-
expunged code were causing the ContentEditorFragment to not
apply a selected photo.

Bug: 5786849
Bug: 5907233
Change-Id: Ic0cabaa50c08d6a9a0b730698c92f4092192438a
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
ecfc26c3f9495f1a4efed69a1582ff2b0deb2c71 13-Sep-2011 Daniel Lehmann <lehmannd@google.com> New avatars

Bug:5074147

Change-Id: I583d22c63a7b617567c523efeed292ae1e2be7e4
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
2293e55d550fbc9974d1185960715e59acb14a85 22-Jul-2011 Katherine Kuan <katherinekuan@google.com> Clear field if try to delete last field in section of contact editor

- Don't remove the field if it's the last field in the section,
just clear all EditText fields in that editor

Bug: 4382255
Change-Id: I2b436fbe895e5cc52770eefedaa2bc5f9726605f
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
2591436971bad3050c85929c8e0c5a8d48111f88 30-Apr-2011 Katherine Kuan <katherinekuan@google.com> Fix "add field" logic

- Only update "add field" footer when field goes empty --> non-empty
and vice versa, fix the case for 4 line addresses in Exchange contacts
- Add property in DataKind class for "add field" string
- Remove hash map of mime types --> string resource IDs in
KindSectionView
- Remove "add internet call" string

Bug: 4363151
Bug: 4371568
Change-Id: Id2fec743a7c3e68d8404591cc61de20487245b0a
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
1b22073590c1801c3e6c7bde2f4636632a049f6c 29-Apr-2011 Katherine Kuan <katherinekuan@google.com> "Add field" footer logic

- Instead of an explicit "+" button to add a new field (which
also allows adding multiple empty fields), only show a
"add field" footer to the KindSectionView if there are no
existing empty fields in the section.
- Make the whole footer a touch target and display a
custom message according to the DataKind mime type

Bug: 4363151
Change-Id: Ib7cef5ed5aaefa5b1269f95ed8fe89e7dd742f36
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
405671a7b42d97ebf7ae7c0eeb4721f881139673 29-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Move DataKind outside AccountTypes

Bug: 4184675
Change-Id: Ibb20cb8b38d0272963fc5330c738bd17c61a5542
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
02bb1252aa990813fa9e86ad75c458acc15e6801 06-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Removing progress dialog when saving a contact

Bug: 3253127
Change-Id: Ifd3b58f202fea76596880fb6de9f8acc46a32d79
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java
18ffaa2561cc7dd2e3ef81737e6537931c0a9a11 03-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Renaming a couple of packages

Change-Id: I2c0f86b51baa622df629206f8b79ef1d0df09119
/packages/apps/Contacts/src/com/android/contacts/editor/PhotoEditorView.java