Bug 1464003 - Refresh sync preference after rebuilding the list. r=Grisha, a=RyanVM
authorVlad Baicu <vlad.baicu@softvision.ro>
Fri, 04 Jan 2019 10:17:03 +0000
changeset 506559 d8bdfdbfaac72dc54f72f629e91cdbff26808c95
parent 506558 a7f72733a1273fc9a9c3f0ff7550dd6ec2327da4
child 506560 1ef66d763f8213068e3f4860395adfdc482c484d
push id10460
push userryanvm@gmail.com
push dateMon, 07 Jan 2019 18:02:00 +0000
treeherdermozilla-beta@df848230cb30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGrisha, RyanVM
bugs1464003
milestone65.0
Bug 1464003 - Refresh sync preference after rebuilding the list. r=Grisha, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D15209
mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferenceFragment.java
--- a/mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferenceFragment.java
+++ b/mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferenceFragment.java
@@ -196,16 +196,17 @@ public class GeckoPreferenceFragment ext
         if (!currentLocale.equals(lastLocale)) {
             // Locales differ. Let's redisplay.
             Log.d(LOGTAG, "Locale changed: " + currentLocale);
             this.lastLocale = currentLocale;
 
             // Rebuild the list to reflect the current locale.
             getPreferenceScreen().removeAll();
             addPreferencesFromResource(getResource());
+            syncPreference = (SyncPreference) findPreference(GeckoPreferences.PREFS_SYNC);
         }
 
         // Fix the parent title regardless.
         updateParentTitle();
     }
 
     /*
      * Get the resource from Fragment arguments and return it.