Fix to update the Change PIN2 UI based on PIN2 state

Add code in onResume of FdnSetting to update the Change
PIN2 UI checking the PIN2 blocked state.
If PIN2 state is blocked, show user the PUK2 dialog else
show the change PIN2 dialog.

bug: 22930273
Change-Id: Ica1c585d74d62f72b41122cf7bc56e4be0d1a3ed
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();
     }
 
     /**