Bug 1401773 - Revert checkboxes->switches changeover for SyncPrefs r=nalexander
MozReview-Commit-ID: 2RwcgomT5UG
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/activities/FxAccountStatusFragment.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/activities/FxAccountStatusFragment.java
@@ -8,23 +8,23 @@ import android.accounts.Account;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
+import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceCategory;
import android.preference.PreferenceScreen;
-import android.preference.SwitchPreference;
import android.support.v4.content.LocalBroadcastManager;
import android.text.TextUtils;
import android.text.format.DateUtils;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Target;
import org.mozilla.gecko.AppConstants;
@@ -94,20 +94,20 @@ public class FxAccountStatusFragment
protected Preference removeAccountPreference;
protected Preference needsPasswordPreference;
protected Preference needsUpgradePreference;
protected Preference needsVerificationPreference;
protected Preference needsMasterSyncAutomaticallyEnabledPreference;
protected Preference needsFinishMigratingPreference;
- protected SwitchPreference bookmarksPreference;
- protected SwitchPreference historyPreference;
- protected SwitchPreference tabsPreference;
- protected SwitchPreference passwordsPreference;
+ protected CheckBoxPreference bookmarksPreference;
+ protected CheckBoxPreference historyPreference;
+ protected CheckBoxPreference tabsPreference;
+ protected CheckBoxPreference passwordsPreference;
protected EditTextPreference deviceNamePreference;
protected Preference syncServerPreference;
protected Preference syncNowPreference;
protected volatile AndroidFxAccount fxAccount;
// The contract is: when fxAccount is non-null, then clientsDataDelegate is
// non-null. If violated then an IllegalStateException is thrown.
@@ -162,20 +162,20 @@ public class FxAccountStatusFragment
removeAccountPreference = ensureFindPreference("remove_account");
needsPasswordPreference = ensureFindPreference("needs_credentials");
needsUpgradePreference = ensureFindPreference("needs_upgrade");
needsVerificationPreference = ensureFindPreference("needs_verification");
needsMasterSyncAutomaticallyEnabledPreference = ensureFindPreference("needs_master_sync_automatically_enabled");
needsFinishMigratingPreference = ensureFindPreference("needs_finish_migrating");
- bookmarksPreference = (SwitchPreference) ensureFindPreference("bookmarks");
- historyPreference = (SwitchPreference) ensureFindPreference("history");
- tabsPreference = (SwitchPreference) ensureFindPreference("tabs");
- passwordsPreference = (SwitchPreference) ensureFindPreference("passwords");
+ bookmarksPreference = (CheckBoxPreference) ensureFindPreference("bookmarks");
+ historyPreference = (CheckBoxPreference) ensureFindPreference("history");
+ tabsPreference = (CheckBoxPreference) ensureFindPreference("tabs");
+ passwordsPreference = (CheckBoxPreference) ensureFindPreference("passwords");
profilePreference.setOnPreferenceClickListener(this);
removeAccountPreference.setOnPreferenceClickListener(this);
needsPasswordPreference.setOnPreferenceClickListener(this);
needsVerificationPreference.setOnPreferenceClickListener(this);
needsFinishMigratingPreference.setOnPreferenceClickListener(this);
--- a/mobile/android/services/src/main/res/xml/fxaccount_status_prefscreen.xml
+++ b/mobile/android/services/src/main/res/xml/fxaccount_status_prefscreen.xml
@@ -56,29 +56,29 @@
android:defaultValue=""
android:persistent="false"
android:title="@string/fxaccount_status_sync_now"
android:summary="" />
<PreferenceCategory
android:title="@string/fxaccount_status_choose_what">
- <SwitchPreference
+ <CheckBoxPreference
android:key="bookmarks"
android:persistent="false"
android:title="@string/fxaccount_status_bookmarks" />
- <SwitchPreference
+ <CheckBoxPreference
android:key="history"
android:persistent="false"
android:title="@string/fxaccount_status_history" />
- <SwitchPreference
+ <CheckBoxPreference
android:key="tabs"
android:persistent="false"
android:title="@string/fxaccount_status_tabs" />
- <SwitchPreference
+ <CheckBoxPreference
android:key="passwords"
android:persistent="false"
android:title="@string/fxaccount_status_passwords" />
</PreferenceCategory>
<EditTextPreference
android:singleLine="true"
android:key="device_name"