Bug 1401773 - Revert checkboxes->switches changeover for SyncPrefs r=nalexander
authorGrigory Kruglov <gkruglov@mozilla.com>
Wed, 20 Sep 2017 19:05:30 -0400
changeset 431629 dc85108a0a305cff7c57d9cd6978b8312d03598f
parent 431628 36d6f521c2b20ca63bfaf2bfdd3aaa656ea17424
child 431630 dd9b01ec0df24f506d2bd2d8d09fd92694901193
push id7785
push userryanvm@gmail.com
push dateThu, 21 Sep 2017 13:39:55 +0000
treeherdermozilla-beta@06d4034a8a03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1401773
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1401773 - Revert checkboxes->switches changeover for SyncPrefs r=nalexander MozReview-Commit-ID: 2RwcgomT5UG
mobile/android/services/src/main/java/org/mozilla/gecko/fxa/activities/FxAccountStatusFragment.java
mobile/android/services/src/main/res/xml/fxaccount_status_prefscreen.xml
--- 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"