Add turn on/off setting for Lychee in Contacts App.
1) User can turn on/off Lychee, or pick an account to backup and restore
contact metadata in Contacts App->Settings.
2) For now, this option is hidden.
3) When user turns Lychee on in Contacts App, set this account's
sync automatically as true and requestSync, others as false.
BUG 26491409
Change-Id: I063787f1465d965d43907ccc31fd0a7f102797e8
diff --git a/res-common/values/strings.xml b/res-common/values/strings.xml
index 17b21eb..6067eda 100644
--- a/res-common/values/strings.xml
+++ b/res-common/values/strings.xml
@@ -663,6 +663,9 @@
<!--Label of the "default account" setting option to set default editor account. [CHAR LIMIT=80]-->
<string name="default_editor_account">Default account for new contacts</string>
+ <!--Label of the "Contact metadata sync account" setting option to set sync account for Lychee. [CHAR LIMIT=80]-->
+ <string name="contact_metadata_sync_account">Contact metadata sync account</string>
+
<!-- Label of the "About" setting -->
<string name="setting_about">About Contacts</string>
diff --git a/res-common/xml/preference_display_options.xml b/res-common/xml/preference_display_options.xml
index f4befc0..ba73a3c 100644
--- a/res-common/xml/preference_display_options.xml
+++ b/res-common/xml/preference_display_options.xml
@@ -33,6 +33,12 @@
android:title="@string/default_editor_account"
android:dialogTitle="@string/default_editor_account" />
+ <com.android.contacts.common.preference.ContactMetadataSyncAccountPreference
+ android:icon="@null"
+ android:key="contactMetadata"
+ android:title="@string/contact_metadata_sync_account"
+ android:dialogTitle="@string/contact_metadata_sync_account" />
+
<PreferenceScreen
android:icon="@null"
android:key="about"