Merge "Fix comparison of SIM State values."
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index df1f470..98bb766 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -265,16 +265,18 @@
// Right now, this is only used for the PUK-unlocking
// process.
EventSimStateChangedBag bag = (EventSimStateChangedBag)msg.obj;
- if (bag.mIccStatus == IccCardConstants.INTENT_VALUE_ICC_READY
- || bag.mIccStatus == IccCardConstants.INTENT_VALUE_ICC_LOADED) {
+ if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(bag.mIccStatus)
+ || IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(bag.mIccStatus)) {
// when the right event is triggered and there
// are UI objects in the foreground, we close
// them to display the lock panel.
if (mPUKEntryActivity != null) {
+ Log.i(LOG_TAG, "Dismiss puk entry activity");
mPUKEntryActivity.finish();
mPUKEntryActivity = null;
}
if (mPUKEntryProgressDialog != null) {
+ Log.i(LOG_TAG, "Dismiss puk progress dialog");
mPUKEntryProgressDialog.dismiss();
mPUKEntryProgressDialog = null;
}
@@ -527,6 +529,7 @@
* or SIM READYing process is over.
*/
void setPukEntryActivity(Activity activity) {
+ Log.i(LOG_TAG, "setPukEntryActivity - set to " + (activity == null ? "null" : "activity"));
mPUKEntryActivity = activity;
}
@@ -544,6 +547,8 @@
* READYing process
*/
void setPukEntryProgressDialog(ProgressDialog dialog) {
+ Log.i(LOG_TAG, "setPukEntryProgressDialog - set to "
+ + (dialog == null ? "null" : "activity"));
mPUKEntryProgressDialog = dialog;
}
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index 8eaa336..c520063 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -363,7 +363,7 @@
// Check to see if a UI exists for the PUK activation. If it does
// exist, then it indicates that we're trying to unblock the PUK.
if ((app.getPUKEntryActivity() != null) && (state == MmiCode.State.COMPLETE)) {
- if (DBG) log("displaying PUK unblocking progress dialog.");
+ log("displaying PUK unblocking progress dialog.");
// create the progress dialog, make sure the flags and type are
// set correctly.