[TelephonyMainline] Cannot use UnsupportedAppUsage API, use appropriate method to replace it.
Bug: 145583708 Test: make Change-Id: Ie2b330e23911198bd6a1aaaa3e03c0ff1ed12ac9 Merged-In: Ie2b330e23911198bd6a1aaaa3e03c0ff1ed12ac9
This commit is contained in:
@@ -508,8 +508,10 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
|
||||
CarrierConfigManager configManager = (CarrierConfigManager)
|
||||
mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
|
||||
int ddSubId = SubscriptionManager.getDefaultDataSubscriptionId();
|
||||
String mccMnc = SubscriptionManager.isValidSubscriptionId(ddSubId)
|
||||
? phone.getSimOperator(ddSubId) : phone.getSimOperator();
|
||||
if (SubscriptionManager.isValidSubscriptionId(ddSubId)) {
|
||||
phone = phone.createForSubscriptionId(ddSubId);
|
||||
}
|
||||
String mccMnc = phone.getSimOperator();
|
||||
boolean isKeepLppProfile = false;
|
||||
if (!TextUtils.isEmpty(mccMnc)) {
|
||||
if (DEBUG) Log.d(TAG, "SIM MCC/MNC is available: " + mccMnc);
|
||||
@@ -1903,24 +1905,17 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
|
||||
String setId = null;
|
||||
|
||||
int ddSubId = SubscriptionManager.getDefaultDataSubscriptionId();
|
||||
if (SubscriptionManager.isValidSubscriptionId(ddSubId)) {
|
||||
phone = phone.createForSubscriptionId(ddSubId);
|
||||
}
|
||||
if ((flags & AGPS_RIL_REQUEST_SETID_IMSI) == AGPS_RIL_REQUEST_SETID_IMSI) {
|
||||
if (SubscriptionManager.isValidSubscriptionId(ddSubId)) {
|
||||
setId = phone.getSubscriberId(ddSubId);
|
||||
}
|
||||
if (setId == null) {
|
||||
setId = phone.getSubscriberId();
|
||||
}
|
||||
setId = phone.getSubscriberId();
|
||||
if (setId != null) {
|
||||
// This means the framework has the SIM card.
|
||||
type = AGPS_SETID_TYPE_IMSI;
|
||||
}
|
||||
} else if ((flags & AGPS_RIL_REQUEST_SETID_MSISDN) == AGPS_RIL_REQUEST_SETID_MSISDN) {
|
||||
if (SubscriptionManager.isValidSubscriptionId(ddSubId)) {
|
||||
setId = phone.getLine1Number(ddSubId);
|
||||
}
|
||||
if (setId == null) {
|
||||
setId = phone.getLine1Number();
|
||||
}
|
||||
setId = phone.getLine1Number();
|
||||
if (setId != null) {
|
||||
// This means the framework has the SIM card.
|
||||
type = AGPS_SETID_TYPE_MSISDN;
|
||||
|
||||
Reference in New Issue
Block a user