Fix to update the Change PIN2 UI based on PIN2 state
am: e17d0ad

* commit 'e17d0ad5a3bb5a6d10d22c7369efc6d8ae2fdb4c':
  Fix to update the Change PIN2 UI based on PIN2 state

Change-Id: I4e0039b23d13185cca9ee028a5343239dd183251
diff --git a/src/com/android/phone/settings/fdn/FdnSetting.java b/src/com/android/phone/settings/fdn/FdnSetting.java
index ac43cce..c76f91d 100644
--- a/src/com/android/phone/settings/fdn/FdnSetting.java
+++ b/src/com/android/phone/settings/fdn/FdnSetting.java
@@ -468,6 +468,20 @@
         }
     }
 
+    /**
+    * Reflect the updated change PIN2 state in the UI.
+    */
+    private void updateChangePIN2() {
+        if (mPhone.getIccCard().getIccPin2Blocked()) {
+            // If the pin2 is blocked, the state of the change pin2 dialog
+            // should be set for puk2 use (that is, the user should be prompted
+            // to enter puk2 code instead of old pin2).
+            resetPinChangeStateForPUK2();
+        } else {
+            resetPinChangeState();
+        }
+    }
+
     @Override
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
@@ -518,6 +532,7 @@
         super.onResume();
         mPhone = mSubscriptionInfoHelper.getPhone();
         updateEnableFDN();
+        updateChangePIN2();
     }
 
     /**