Update all preferences when the account preference updates UI
When an account is added or removed, the account preference controller just updates the account list, whereas there's no trigger point for the account data sync preferences to refresh. Add an API to update all preferences in DashboardFragment, so we can refresh the account sync preferences whenever the account list is updated. Bug: 185479221 Test: robotest, manual Change-Id: Ide3d972abae09ce0175e3bafbb1f4a5e307d20c8
This commit is contained in:
@@ -297,6 +297,14 @@ public class DashboardFragmentTest {
|
||||
mTestFragment.updatePreferenceVisibility(prefControllers);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forceUpdatePreferences_prefKeyNull_shouldNotCrash() {
|
||||
mTestFragment.addPreferenceController(new TestPreferenceController(mContext));
|
||||
|
||||
// Should not crash
|
||||
mTestFragment.forceUpdatePreferences();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkUiBlocker_noUiBlocker_controllerIsNull() {
|
||||
mTestFragment.mBlockerController = null;
|
||||
|
Reference in New Issue
Block a user