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:
Robin Lee
2016-04-21 12:56:21 +01:00
parent e06d757a0c
commit b166ea2668
4 changed files with 71 additions and 87 deletions

View File

@@ -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();
}
}
/**