Fix the problem that the "Turn off SIM" dialog will be displayed
when the MobileNetwork page is slid to to top. - Update the onBindViewHolder method of SettingsMainSwitchPreference. The root cause is that the onBindViewHolder method reset the visibility state of the SwitchBar. Fix: 190652161 Test: robotest and test MobileNetwork page manually. Change-Id: If0a75579fd4bf0fe987ce5d11d2f11d10f4bc43c
This commit is contained in:
@@ -82,15 +82,15 @@ public class SettingsMainSwitchPreference extends TwoStatePreference implements
|
||||
holder.setDividerAllowedAbove(false);
|
||||
holder.setDividerAllowedBelow(false);
|
||||
|
||||
mMainSwitchBar = (SettingsMainSwitchBar) holder.findViewById(R.id.main_switch_bar);
|
||||
mMainSwitchBar.show();
|
||||
if (mRestrictedHelper != null) {
|
||||
mEnforcedAdmin = mRestrictedHelper.checkRestrictionEnforced();
|
||||
}
|
||||
updateStatus(isChecked());
|
||||
registerListenerToSwitchBar();
|
||||
|
||||
if (!mIsVisible) {
|
||||
mMainSwitchBar = (SettingsMainSwitchBar) holder.findViewById(R.id.main_switch_bar);
|
||||
if (mIsVisible) {
|
||||
mMainSwitchBar.show();
|
||||
updateStatus(isChecked());
|
||||
registerListenerToSwitchBar();
|
||||
} else {
|
||||
mMainSwitchBar.hide();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user