diff options
author | 2014-10-09 16:41:25 -0700 | |
---|---|---|
committer | 2014-10-10 16:03:54 -0700 | |
commit | d9015233f50724294bb408f1c56715a581dc4bed (patch) | |
tree | e9609fa9518fb442a48996e134d845a90cb69aba /java/res | |
parent | 1e10d29bc8975ea45ca5e3bdf1936aa418161bcb (diff) | |
download | latinime-d9015233f50724294bb408f1c56715a581dc4bed.tar.gz latinime-d9015233f50724294bb408f1c56715a581dc4bed.tar.xz latinime-d9015233f50724294bb408f1c56715a581dc4bed.zip |
Set up a sync preference and policy for syncing [2]
- Adds a preference for enabling sync, which controls the sync behavior
- Make the ProductionFlags depend on appropriate flags to guarantee that
we don't mess things when flipping some flags
- Preferences now control the "syncable" property of the provider
thereby controlling the policy and when this entry shows up in
system settings.
Bug: 17464069
Change-Id: I1d58351188518c1ae9f1f9e147b5ea15d32a3427
Diffstat (limited to 'java/res')
-rw-r--r-- | java/res/values/strings.xml | 8 | ||||
-rw-r--r-- | java/res/xml/prefs_screen_accounts.xml | 13 |
2 files changed, 16 insertions, 5 deletions
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 6aea637c5..ed05e916f 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -56,9 +56,11 @@ <!-- Option for enabling or disabling the split keyboard layout. [CHAR LIMIT=65]--> <string name="enable_split_keyboard">Enable split keyboard</string> - <string name="sync_now_title" translatable="false">Sync Now</string> - <string name="sync_now_summary" translatable="false">Sync your personal dictionary</string> - <string name="sync_now_summary_disabled_signed_out" translatable="false">Select an account to enable sync</string> + <!-- TODO: Enable translation for user-visible strings --> + <string name="cloud_sync_title" translatable="false">Enable sync</string> + <string name="cloud_sync_summary" translatable="false">Sync your personal dictionary across devices</string> + <string name="cloud_sync_summary_disabled_signed_out" translatable="false">Select an account to enable sync</string> + <string name="sync_now_title" translatable="false">[DEBUG] Sync Now</string> <!-- Option name for including other IMEs in the language switch list [CHAR LIMIT=30] --> <string name="include_other_imes_in_language_switch_list">Switch to other input methods</string> diff --git a/java/res/xml/prefs_screen_accounts.xml b/java/res/xml/prefs_screen_accounts.xml index 003a37ff7..41642bf08 100644 --- a/java/res/xml/prefs_screen_accounts.xml +++ b/java/res/xml/prefs_screen_accounts.xml @@ -28,7 +28,15 @@ android:title="@string/switch_accounts" android:summary="@string/no_accounts_selected" /> - <!-- title will be set programmatically to embed application name --> + <!-- Summary will be set programmatically to reflect the account status --> + <CheckBoxPreference + android:key="pref_enable_cloud_sync" + android:title="@string/cloud_sync_title" + android:defaultValue="false" + android:persistent="true" + android:disableDependentsState="false" /> + + <!-- Title will be set programmatically to embed application name --> <CheckBoxPreference android:key="pref_enable_metrics_logging" android:summary="@string/enable_metrics_logging_summary" @@ -38,5 +46,6 @@ <!-- This preference (acts like a button) enables the user to initiate an one time sync. --> <Preference android:key="pref_beanstalk" android:persistent="false" - android:title="@string/sync_now_title" /> + android:title="@string/sync_now_title" + android:dependency="pref_enable_cloud_sync" /> </PreferenceScreen> |