Merge "Do not wait for opportunistic sub to be IN SERVICE for test emergency"
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 0042ff5..4b29f4a 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -482,7 +482,10 @@
                         // it is a test emergency number and we have to wait for the device to move
                         // IN_SERVICE before the call can take place over normal routing.
                         return (phone.getState() == PhoneConstants.State.OFFHOOK)
-                            || serviceState == ServiceState.STATE_IN_SERVICE;
+                                // Do not wait for voice in service on opportunistic SIMs.
+                                || SubscriptionController.getInstance().isOpportunistic(
+                                        phone.getSubId())
+                                || serviceState == ServiceState.STATE_IN_SERVICE;
                     }
                 }
             });