Merge "Use sub specific telephony for emergency supl" into rvc-dev am: a02b54d79c

Change-Id: I6e0c0b3f19d36e4602b1f3a58d6bb6f96619b931
This commit is contained in:
Joe Huang
2020-03-25 12:47:37 +00:00
committed by Automerger Merge Worker

View File

@@ -711,6 +711,15 @@ class GnssNetworkConnectivityHandler {
}
TelephonyManager phone = (TelephonyManager)
mContext.getSystemService(Context.TELEPHONY_SERVICE);
// During an emergency call with an active sub id, get the Telephony Manager specific
// to the active sub to get the correct value from getServiceState and getNetworkType
if (mNiHandler.getInEmergency() && mActiveSubId >= 0) {
TelephonyManager subIdTelManager =
phone.createForSubscriptionId(mActiveSubId);
if (subIdTelManager != null) {
phone = subIdTelManager;
}
}
ServiceState serviceState = phone.getServiceState();
String projection = null;
String selection = null;