Ensure MMIDialogActivity can respond to IMS MMI codes.
When determining whether to show the MMI progress dialog, only the base
phone was being considered for pending MMI codes. Adding in any pending
MMI codes for the IMS phone as well to solve the problem that IMS MMI
codes do not show a progress dialog.
Test: Manual
Bug: 62281419
Merged-In: I8f4fe72750dcf271538c6ea44a087808e717d4e3
Change-Id: I8f4fe72750dcf271538c6ea44a087808e717d4e3
(cherry picked from commit abb0624423c82785a377fd41287545e5f8d21d4b)
diff --git a/src/com/android/phone/MMIDialogActivity.java b/src/com/android/phone/MMIDialogActivity.java
index 165118b..4afa6be 100644
--- a/src/com/android/phone/MMIDialogActivity.java
+++ b/src/com/android/phone/MMIDialogActivity.java
@@ -32,6 +32,7 @@
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -88,7 +89,11 @@
}
private void showMMIDialog() {
- final List<? extends MmiCode> codes = mPhone.getPendingMmiCodes();
+ final List<MmiCode> codes = new ArrayList<>(mPhone.getPendingMmiCodes());
+ // If the phone has an IMS phone, also get pending imS MMIsl.
+ if (mPhone.getImsPhone() != null) {
+ codes.addAll(mPhone.getImsPhone().getPendingMmiCodes());
+ }
if (codes.size() > 0) {
final MmiCode mmiCode = codes.get(0);
final Message message = Message.obtain(mHandler, PhoneGlobals.MMI_CANCEL);