History log of /packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/activities/AttachPhotoActivity.java
61414c2c4627ab588cc0f54eae5e0c5591f7d8d9 19-Jun-2012 Chiao Cheng <chiaocheng@google.com> Fixed bug where contact photo did not scale up when cropped.

- Added scaleUpIfNeeded extra to gallery intents.
- Consolidated gallery "extras" code into common utility method.

Bug: 6678247
Change-Id: I4c2b9fb2a88d203fe06303b470f0eb35a5cc6766
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
45ee872fe7be69c6b3f0c59167eecd11af467812 22-May-2012 Makoto Onuki <omakoto@google.com> Don't send view notification before showing quick contact

Instead, do this in the second load. This directly affects the quick contact
startup time.

Bug 6529921

Change-Id: Ief7bda9bd32cb4be0c86c4b79efb35da812721dc
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
4a964d983b65871bcc08fe16baea8cf2e0994061 11-May-2012 Josh Gargus <jjosh@google.com> Disable "Create new contact" when setting photo from gallery.

Bug: 5288751
Change-Id: I8c2c56ca44b5bdca56b7b20a1dfe510ec08a76c3
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
ebc17929007ecf12f25b8e90023766e8a083d11e 05-May-2012 Josh Gargus <jjosh@google.com> Don't stash cropped photos in /sdcard/DCIM.

Every time we choose a new contact photo (either an existing one from
the gallery or a new one from the camera), we write the cropped image
/sdcard/DCIM. As a result, the cropped image (eventually) appears in
the gallery, is uploaded to G+, etc.

The new behavior is to write the cropped photo to a temp directory,
and to clear it when we're done with it.

Revert some of the changes from Ib7037a66; we still need to persist
properties in onSaveInstanceState() in case ContactEditorFragment is
killed while the user interacts with the camera/gallery.

Bug: 6423139
Change-Id: Icf8cb5b4824e3d8757ff483ef128527ac9132e72
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
dd3dc56d035914f80147fd8fa100a849f9215a3d 25-Apr-2012 Daniel Lehmann <lehmannd@google.com> Remove Listener from ContactLoader as it is never used

Change-Id: Iee791ccd6ce1ebb8a81375e1d60f31fbb91bbb16
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.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/activities/AttachPhotoActivity.java
6fa7384a1a5576ace18159de61af91c8b7c34dc6 28-Sep-2011 Dave Santoro <dsantoro@google.com> Allow adding/replacing a photo from contact card.

This involves a large refactoring of the photo handling code that
previously lived in ContactEditorFragment. The bulk of that logic
has been extracted out into PhotoSelectionHandler and
PhotoSelectionActivity classes.

As part of this change, also removed the selection highlighting when
tapping on the current tab header in multi-tab views.

Bug 5294297
Bug 5379389

Change-Id: Ic929e4b4a730d91f768a34367bb76967228ded17
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
2b3f3c54d3beb017b2f59f19e9ce0ecc3e039dbc 27-Jul-2011 Dave Santoro <dsantoro@google.com> App changes for account types with data sets.

This is primarily a replacement of the Android Account object in most
parts of the app with a new AccountWithDataSet object that extends
Account (by adding an additional attribute, the data set).

This also includes a major refactoring of the AccountTypeManager,
both to allow it to handle data sets and to allow for
non-sync-adapter packages to be referenced by the sync adapters for
an account and registered as sources of contact data. Attributes of
the sync adapter that would typically come from the authenticator
can be parsed out of the Contacts XML for these packages.

Bug 5077096

Change-Id: I88f311c64eae78c88e9999bff6f7de8538e62157
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
0a2a5db3b3633883388953dc98e30c2edd7cae62 29-Jun-2011 Dave Santoro <dsantoro@google.com> Contacts App modifications for large photos.

Most of the work is on the provider side - essentially, the
provider will now deal with any size photo, downsizing it as
necessary to fit in a display size and thumbnail size. So
on the client we just need to pass in a larger photo to get a
hi-res display image for the contact.

Also switched a few spots to use the PHOTO_URI (with
openAssetFile) instead of PHOTO_THUMB_URI - more likely
remain.

Change-Id: I6ff8dd5453a9ff787907ab113d6e8aa6a71fcae1
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
6f667b55687bf9193323802e8f3234f0ab254388 09-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Turning AccountTypeManager into a "system" service.

It's really not a system service proper. It just
uses the same API and the same dependency injection
mechanism as for system services.

Change-Id: I56e24e0f16642a5ab25e809ee12906d965845379
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java
19d51ac4d931c17c8d84b65ed13199c0ccdeb20e 04-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Renaming an activity class. Removing dead code.

Change-Id: I509fa747441d8d3d5168aa07a4ada4434f02d190
/packages/apps/Contacts/src/com/android/contacts/activities/AttachPhotoActivity.java