Add USSD code running dialog to TeleService
Add USSDDialogActivity, a special activity used to display
a progress dialog when running USSD codes
Bug: 11456498
Change-Id: I8318068eda9d1ca199c60592d9f16064cf4571b4
diff --git a/src/com/android/phone/CallController.java b/src/com/android/phone/CallController.java
index 52dbf76..0519280 100644
--- a/src/com/android/phone/CallController.java
+++ b/src/com/android/phone/CallController.java
@@ -23,9 +23,7 @@
import com.android.phone.CallGatewayManager.RawGatewayInfo;
import com.android.phone.Constants.CallStatusCode;
import com.android.phone.ErrorDialogActivity;
-import com.android.phone.OtaUtils.CdmaOtaScreenState;
-import android.app.AlertDialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
@@ -34,9 +32,7 @@
import android.provider.CallLog.Calls;
import android.telephony.PhoneNumberUtils;
import android.telephony.ServiceState;
-import android.text.TextUtils;
import android.util.Log;
-import android.widget.Toast;
/**
* Phone app module in charge of "call control".
@@ -662,12 +658,11 @@
// TODO: Rather than launching a toast from here, it would
// be cleaner to just set a pending call status code here,
// and then let the InCallScreen display the toast...
- if (mCM.getState() == PhoneConstants.State.OFFHOOK) {
- Toast.makeText(mApp, R.string.incall_status_dialed_mmi, Toast.LENGTH_SHORT)
- .show();
- }
+ final Intent mmiIntent = new Intent(mApp, MMIDialogActivity.class);
+ mmiIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
+ Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ mApp.startActivity(mmiIntent);
return;
-
default:
Log.wtf(TAG, "handleOutgoingCallError: unexpected status code " + status);
// Show a generic "call failed" error.