History log of /packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f8ce15cc8a76ff536e1b5b19163589176adde58f 03-Nov-2011 Makoto Onuki <omakoto@google.com> Fix bug 5563362: failed to initialize external account type

The contacts.xml parser has had a bug that it processes each ContactsDataKind
tag twice,for START_TAG and for END_TAG.

When processing for END_TAG, because an end tag doesn't have attributes
it created an empty DataKind, with null mimetype. (This bug existed even
before the EditSchema change, meaning MR0 still has this issue.)

Before MR1 this null mimetype was just not used anywhere, so it was okay.
But in MR1 we have the duplicate mimetype check, and it will complain
if a contacts.xml has more than one ContactsDataKind therefore has multiple
"null" mimetype definitions.

Made sure to only process for START_TAG. Also cleaned up existing code
with a similar check.

Also included the package name in the error message for duplicated mimetypes.

Bug 5563362

Change-Id: Ib68fb0dca03784c4d7976ac8bf68b1dce5305b03
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
c641e62225a253373c08cdd9e3144df090162b60 08-Nov-2011 Makoto Onuki <omakoto@google.com> EditSchema: add mandatory check for "name" and "photo".

- The editor works fine without other fields.
- Also added test for missing supports* attributes for the name kind.
(for now, all the support* attributes must be true. Otherwise the
editor may not work properly.)
- Also fixed the default value for the support* attributes, which was
mistakenly set to true.

Bug 5578679

Change-Id: Iec5412feb3aa671b64f74d850ccf67daaa87c88e
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
86ccb6ce2ff6078b06add93aab489951ef83bc72 19-Oct-2011 Makoto Onuki <omakoto@google.com> Follow up to EditSchema parser

- Now AccountType.addKind() throws DefinitionException instead of just logging.

- Now the test contacts.xml (= test_basic_contacts.xml) defines "event" and
"relationship" DataKinds too. BUA should be able to copy this file.

- Added another xml, contacts_fallback.xml, to the test apk.
This defines what's equivalent to the fallback type. Unittests load this file
directly and compares the result to the fallback account type.

- Cleaned up existing account definitions in order to make sure
contacts_fallback.xml is really identical to the fallback type. This includes:

** Now structured name, display name, phonetic name, and phone DataKinds
all have 'kind.typeOverallMax = 1'.

** The "assistant" phone type is no longer a custom column. It's only used for
the fallback type and I don't think it's too critical.

- Also, NameKindBuilder no longer re-order phonetic fields, because no
other account types do this. In the previous CL I did it because I thought
that'd be more "correct", but on the second thought it's probably not a good
idea to make too many non-critical changes at this point.

Bug 5381810

Change-Id: Ie6a4eb3b876ab22a3dcdb6a9c278e387f8166125
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.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/src/com/android/contacts/model/ExternalAccountType.java
ee05dcdd4b066ad909322c10919fb1812214673b 06-Oct-2011 Katherine Kuan <katherinekuan@google.com> Cleanup of chat capability icon and primary icon in DataKind

- Add content description to chat capability icon for
accessibility

- Remove primary icon from DataKind because we don't display
it anymore in the UI (it's an unused field since we only
display secondary action icons now)

Bug: 5416674
Change-Id: I6587dd9186af68b0e794d3e73cbc3dad9fdac332
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
e099fbf70e6b3908388a1d87a1209f05932eb673 07-Oct-2011 Makoto Onuki <omakoto@google.com> Fix duplicated DataKinds for external account types

Bug 5430460

Change-Id: I99228b7dcfaa7bc7af0c2eaac2210398ebaa2e1e
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
d7dfdee089842b5c8cf65f9d4251fb428ad79aa2 29-Sep-2011 Daniel Lehmann <lehmannd@google.com> Allow sync adapter to rename the "View Updates" button

Bug:5382678
Change-Id: Id848c018788d31927b27863ea86d45159aa31040
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
2b3ee0f34801444c7d775ce747125459f69712bb 22-Sep-2011 Daniel Lehmann <lehmannd@google.com> Make third party sync adapters editable

- Already merged in factory rom branch under
https://android-git.corp.google.com/g/#/c/136996/
but marked as do not merge, so we submit it
here manually

Bug:3093621

Change-Id: If3bb34f7d29bea4bd873342232bea3c1a77bcd2a
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.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/src/com/android/contacts/model/ExternalAccountType.java
b5e4419f4ba06d630331669a08613936889f34df 23-Aug-2011 Makoto Onuki <omakoto@google.com> Contacts to display: hide accounts without raw contacts

- Hide extension accounts with no raw contacts.

- Now that building the list hits the database we need to use AsyncTaskLoader.

- Did a little refactoring (e.g. moving mFilter to the adpter) so the code will
work better with a loader.

Bug 5160471

Change-Id: I780985a73325d4d453962e8ea5dca0d68c3c869e
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
8545ec4d78e5bdaec87b0ae59c448acc96856b4c 17-Aug-2011 Makoto Onuki <omakoto@google.com> Only load extension packages with contacts.xml

It's still okay for non-extension packages to not have contacts.xml.
Enforcing it for them may break backward compatibility.

Bug 5173717

Change-Id: I1ff914f24f08f5bba9cb956e516a78de8144bd2b
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
d78ee90c0d4d93b82ad440396e87ae4f47f53e93 15-Aug-2011 Daniel Lehmann <lehmannd@google.com> Several DB changes as requested by ES

- Switch from resource ids to names to prevent breakage on package upgrade
Bug:5135277
- Add SYNC1...SYNC4 columns to StreamItems and StreamItemPhotos
Bug:5119385
- Remove ACTION, ACTION_URI from Groups, StreamItems and StreamItemPhotos
(this reduces db size and prevents click intercepting)
Bug:5135808
- Add some raw-contact fields to the StreamItem and StreamItemPhotos query
Bug:5134081

Doing those changes in one block to prevent too many db upgrade steps

Change-Id: I4c90742580c86203a1686bb625c026438ed19b8f
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
3ef27fb18a2fe075c43131b653cd2e6306e187e2 09-Aug-2011 Daniel Lehmann <lehmannd@google.com> Start service intent when contact is being displayed

Bug:5138185
Change-Id: I84dbf0f933d575b4910b220fe9743a47f46d5762
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
d28eaaa2b5b4e4ae8a79b08073d49208979fdee4 01-Aug-2011 Dave Santoro <dsantoro@google.com> Allow external account types to parse any package.

This allows for external account types to be managed via a package
that isn't a sync adapter, so long as the package contains a service
that provides the necessary contacts metadata.

Bug 5077096

Change-Id: Ic2b545a276421b45d55d512f3901df8ff75d05fe
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.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/model/ExternalAccountType.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/src/com/android/contacts/model/ExternalAccountType.java
5ec40b04041818bc042c0671cb1a43b54f650e25 02-Mar-2011 Dmitri Plotnikov <dplotnikov@google.com> Modernizing phonetic name support

Bug: 3497894

Change-Id: I5aaa77275bbe1921af2d7ef034d2319691f8abf7
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
1dc28bef7d5353310359c3711b6cdac390d8a2e0 11-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Restoring full functionality of no-account contacts

Bug: 3339401
Change-Id: I2c185ee6e1189b89fce875f59b55ccd68edf6313
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
b77be6d2ad06edfd8751f55043e4aa9fd9f36015 04-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Removing inflation levels from AccountType.

Also, fixing asynchronous update and concurrency issues.

Bug: 3140873

Change-Id: Ie9d342d23ee4a8d23405ef4145c54d7673b2cbe9
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
fff6f07a02d3e3bbeff2ecf94a703782b71aea66 22-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for 3rd party contact editing

Change-Id: I0379f7392a23aea68d0f59a9869bb72275f5bddb
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
17aa9d58cdf2eddcffa94d1d8b3c7cbba3d71211 15-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing twitter profile display

Bug: 3197162
Change-Id: I24f5156b5f639733e49338f7f467b03aabf2bc81
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
4597c92d655d45447780b32c7572acef110b6ed1 15-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Renaming BaseAccountType to AccountType

Change-Id: Iff47bac0e1a118f4a5319526304df16cb89bd0cd
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
52c102fcce20f03098f34d1db7d676079d9446fe 19-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Restoring support for external contacts account type XML

Change-Id: I3333fcc16312d8d593396f61019ada83f26c5f8d
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java
35769b804fbfd5a1fc0b2c36cd0a786d662c4334 19-Oct-2010 Daniel Lehmann <lehmannd@google.com> Renamed Sources to AccountTypes

Change-Id: I088c7d9cd66fd4d38e93bc97a6644247f72037ef
/packages/apps/Contacts/src/com/android/contacts/model/ExternalAccountType.java