Only show the "Disable eSIM" when eSIM profile is enabled

Before this CL, we always show "Disable eSIM" button in SIM lock screen
if the device has eSIM chip. This may make the user who has never used
eSIM or currently is not activated the eSIM Profile confused. This CL
makes the "Disable eSIM" button only be shown iff the device has eSIM
chip and the current activated Profile is eSIM profile.

Bug: 37518023
Test: E2E
Change-Id: Id5a1325f49733528a370ec7145fe49731243bcf7
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
index 61a1488..d8163ba 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
@@ -32,6 +32,7 @@
 import android.telephony.euicc.EuiccManager;
 import android.util.AttributeSet;
 import android.util.Log;
+import android.view.View;
 import android.view.WindowManager;
 import android.widget.ImageView;
 
@@ -119,6 +120,7 @@
             state = ENTER_PUK;
             KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
             mSubId = monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED);
+            boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId);
             if (SubscriptionManager.isValidSubscriptionId(mSubId)) {
                 int count = TelephonyManager.getDefault().getSimCount();
                 Resources rez = getResources();
@@ -134,16 +136,18 @@
                         color = info.getIconTint();
                     }
                 }
-                EuiccManager euiccManager =
-                        (EuiccManager) mContext.getSystemService(Context.EUICC_SERVICE);
-                if (euiccManager.isEnabled()) {
+                if (isEsimLocked) {
                     msg = msg + " " + rez.getString(R.string.kg_sim_lock_instructions_esim);
                 }
                 mSecurityMessageDisplay.setMessage(msg);
                 mSimImageView.setImageTintList(ColorStateList.valueOf(color));
             }
+            KeyguardEsimArea esimButton = findViewById(R.id.keyguard_esim_area);
+            esimButton.setVisibility(isEsimLocked ? View.VISIBLE : View.GONE);
             mPasswordEntry.requestFocus();
         }
+
+
     }
 
     @Override