Be more aggressive caching Vpn preference attrs
As any change to the preference title will cause it to lose focus, best not to do this too often. Change-Id: Ibac27ee1de42fd7ca05f3e3685b84f37dac39517 Fix: 28191965
This commit is contained in:
@@ -62,13 +62,18 @@ public abstract class ManageablePreference extends GearPreference {
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
mState = state;
|
||||
updateSummary();
|
||||
if (mState != state) {
|
||||
mState = state;
|
||||
updateSummary();
|
||||
notifyHierarchyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public void setAlwaysOn(boolean isEnabled) {
|
||||
mIsAlwaysOn = isEnabled;
|
||||
updateSummary();
|
||||
if (mIsAlwaysOn != isEnabled) {
|
||||
mIsAlwaysOn = isEnabled;
|
||||
updateSummary();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user