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
diff --git a/src/com/android/settings/vpn2/ManageablePreference.java b/src/com/android/settings/vpn2/ManageablePreference.java
index 7c07e20..e31a396 100644
--- a/src/com/android/settings/vpn2/ManageablePreference.java
+++ b/src/com/android/settings/vpn2/ManageablePreference.java
@@ -62,13 +62,18 @@
     }
 
     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();
+        }
     }
 
     /**