Always show line1 number in emergency call.

The subcription number might be different than the line1 number (sim number),
which could be confusion to user during emergency call when it's not same as
the sim number the user knows of.

Bug: 65685277
Test: manual
PiperOrigin-RevId: 169147724
Change-Id: I2f89559d10a188b13937e80528b756cc9b11a02e
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 1a99809..9f89925 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -38,7 +38,6 @@
 import android.telecom.StatusHints;
 import android.telecom.TelecomManager;
 import android.telecom.VideoProfile;
-import android.telephony.PhoneNumberUtils;
 import android.text.TextUtils;
 import com.android.contacts.common.compat.CallCompat;
 import com.android.contacts.common.compat.telecom.TelecomManagerCompat;
@@ -1156,26 +1155,10 @@
       boolean showCallbackNumber = hasProperty(Details.PROPERTY_EMERGENCY_CALLBACK_MODE);
 
       if (isEmergencyCall() || showCallbackNumber) {
-        callbackNumber = getSubscriptionNumber();
-      } else {
-        StatusHints statusHints = getTelecomCall().getDetails().getStatusHints();
-        if (statusHints != null) {
-          Bundle extras = statusHints.getExtras();
-          if (extras != null) {
-            callbackNumber = extras.getString(TelecomManager.EXTRA_CALL_BACK_NUMBER);
-          }
-        }
+        callbackNumber =
+            mContext.getSystemService(TelecomManager.class).getLine1Number(getAccountHandle());
       }
 
-      String simNumber =
-          mContext.getSystemService(TelecomManager.class).getLine1Number(getAccountHandle());
-      if (!showCallbackNumber && PhoneNumberUtils.compare(callbackNumber, simNumber)) {
-        LogUtil.v(
-            "DialerCall.getCallbackNumber",
-            "numbers are the same (and callback number is not being forced to show);"
-                + " not showing the callback number");
-        callbackNumber = "";
-      }
       if (callbackNumber == null) {
         callbackNumber = "";
       }
@@ -1183,21 +1166,6 @@
     return callbackNumber;
   }
 
-  private String getSubscriptionNumber() {
-    // If it's an emergency call, and they're not populating the callback number,
-    // then try to fall back to the phone sub info (to hopefully get the SIM's
-    // number directly from the telephony layer).
-    PhoneAccountHandle accountHandle = getAccountHandle();
-    if (accountHandle != null) {
-      PhoneAccount account =
-          mContext.getSystemService(TelecomManager.class).getPhoneAccount(accountHandle);
-      if (account != null) {
-        return getNumberFromHandle(account.getSubscriptionAddress());
-      }
-    }
-    return null;
-  }
-
   @Override
   public void onVideoTechStateChanged() {
     update();