History log of /packages/apps/Contacts/tests/src/com/android/contacts/model/AccountTypeManagerTest.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/tests/src/com/android/contacts/model/AccountTypeManagerTest.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/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
3e435f0e724cb3e88efce15f760e59b9bc08f0d3 12-Jun-2012 Chiao Cheng <chiaocheng@google.com> Change usages of com.google.android to com.google.common.

The people app contains usages of both com.google.android and com.google.common.
Changing code to use the later guava library since it will be needed to unbundle
the app in the future.

Change-Id: I2700126e020166ea1bbbd87c40e77428efde41f3
/packages/apps/Contacts/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
dcf751d75ad5d31620a4216d8c53fd59525e8bd8 18-Oct-2011 Makoto Onuki <omakoto@google.com> EditSchema parser for ExternalAccountType

This also includes:
- Removed getHeaderColor/getSideBarColor from AccountType

- Implemented a test authenticator/sync adapter in the test apk.
This defines a test account type "com.android.contacts.tests.authtest.basic".
We could potentially add more account types to the test apk to test different
edit schema variations, but at this point this is impossible, as
ExternalAccountType doesn't have a way to tell which contacts.xml belongs
to which account type. The current contacts.xml defined here builds
the fallback account type equivalent.

The sync adapter is pretty rudimentary; it doesn't clear the isDirty flag
on modified raw contacts or delete raw contacts with isDeleted set. At
this point this doesn't seem to be necessary to test EditSchema.

Note:
For now it's still not meant to be public API. Right now it's only manually
tested with the edit schema defition in the test apk described above.

Bug 5381810

Change-Id: Ifefdb969b4e08775125924b1366d24effc4db2f2
/packages/apps/Contacts/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
08bcf715d5ea7f07ce18a282d9850ac70552ca9d 09-Oct-2011 Katherine Kuan <katherinekuan@google.com> Only show "add connection" button if relevant

- We don't want to present the user with the "add connection"
button if the user doesn't use the account that provides the
service

- Check if app contributing the account type is disabled or not

- Check if there is an activity to handle the "add connection"
intent

- Check if there are raw contacts in the database with that
account type

- Store this in a cache, and refresh it after a certain
period of time (i.e. 1 second) using an AsyncTask.
This is to prevent computing the list each time the contact
is loaded (which can happen many times especially when looking
at a detail page during a sync).

- Make sure public AccountTypeManager methods
first check ensureAccountsLoaded()

Bug: 5398529
Change-Id: I004f9562a587035a3168aaddb6eb43710fd201e6
/packages/apps/Contacts/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
96e87fd6e808e9d853263ffeb5104f3253a18639 21-Sep-2011 Daniel Lehmann <lehmannd@google.com> Use existence of editor as indicator whether source is editable.

Bug:3093621

Change-Id: I3ba344667ce1b0f2da6847d783c0ac90f36ebd8f
/packages/apps/Contacts/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
6ad227f990265254864a04d3289292ca42330c71 15-Aug-2011 Makoto Onuki <omakoto@google.com> Friend intent: Proper support for dataSet

- Introduce AccountTypeWithDataSet to encapsulate accountType + dataSet
and use it instead of the "account type + '/' + dataset" string,
for better type safety.

Bug 5162267

Change-Id: Id96aea69804bb1151b612838f3fdc24841e5f527
/packages/apps/Contacts/tests/src/com/android/contacts/model/AccountTypeManagerTest.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/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
9aa9e846dec6c2958be6ce120e138e484fdba330 21-Jul-2011 Makoto Onuki <omakoto@google.com> Add fields to AccountType for the new "invite" feature

- Add two attributes, inviteContactActivity and inviteContactActionLabel,
to the contacts.xml file, in addition to the existing ones such as
editContactActivity.

e.g.
<ContactsAccountType
xmlns:android="http://schemas.android.com/apk/res/android"
inviteContactActivity="com....editor.InviteContactActivity"
inviteContactActionLabel="@string/invite_action_label">

- Add two methods to AccountType to obtain the new attributes.
(getInviteContactActionLabel() will return a localized string)

- Add AccountTypeManager.getInvitableAccountTypes() which returns
AccountType's which define the invite activity and have one or more account.

Change-Id: I545b47a7e4957765684314870739085ea0355a98
/packages/apps/Contacts/tests/src/com/android/contacts/model/AccountTypeManagerTest.java