Use TelecomManager#placeCall to place emergency calls.

When dialing an emergency call from the emergency dialer, use
TelecomManager#placeCall to place the call instead of using the call
intent.

Test: Manually tested E-calling with ril.ecclist.
Bug: 76005593
Change-Id: I3eb805897d67b0edb77ff9fc2baef2afc39f1040
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index 4cbfb38..a98c201 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -33,6 +33,7 @@
 import android.os.PersistableBundle;
 import android.provider.Settings;
 import android.telecom.PhoneAccount;
+import android.telecom.TelecomManager;
 import android.telephony.CarrierConfigManager;
 import android.telephony.PhoneNumberUtils;
 import android.telephony.SubscriptionManager;
@@ -587,10 +588,8 @@
                 playTone(ToneGenerator.TONE_PROP_NACK);
                 return;
             }
-            Intent intent = new Intent(Intent.ACTION_CALL_EMERGENCY);
-            intent.setData(Uri.fromParts(PhoneAccount.SCHEME_TEL, mLastNumber, null));
-            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            startActivity(intent);
+            TelecomManager tm = (TelecomManager) getSystemService(TELECOM_SERVICE);
+            tm.placeCall(Uri.fromParts(PhoneAccount.SCHEME_TEL, mLastNumber, null), null);
         } else {
             if (DBG) Log.d(LOG_TAG, "rejecting bad requested number " + mLastNumber);