Only check pending emergency call if TelephonyConnectionService nonull.

Bug: 191304350
Test: b/191304350

Change-Id: I806332a1eb214459475ce8db79f76441339c47e2
Merged-In: I806332a1eb214459475ce8db79f76441339c47e2
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index b03d6f3..6e003b4 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -9628,13 +9628,7 @@
 
                         TelephonyConnectionService service =
                                 registry.getTelephonyConnectionService();
-                        if (service == null) {
-                            Log.e(LOG_TAG, "TelephonyConnectionService is null");
-                            thermalMitigationResult =
-                                    TelephonyManager.THERMAL_MITIGATION_RESULT_INVALID_STATE;
-                            break;
-
-                        } else if (service.isEmergencyCallPending()) {
+                        if (service != null && service.isEmergencyCallPending()) {
                             Log.e(LOG_TAG, "An emergency call is pending");
                             thermalMitigationResult =
                                     TelephonyManager.THERMAL_MITIGATION_RESULT_INVALID_STATE;