Remove usage of @hide @Deprecated Telephony API in NPMS
Bug: 140908357 Test: build and unittest Change-Id: I33ce53a8f6156f77c09a5562382e39f14c45bc78
This commit is contained in:
committed by
Xiangyu/Malcolm Chen
parent
8de5385616
commit
59c78ab2b7
@@ -3047,12 +3047,13 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
// Verify they're not lying about package name
|
||||
mAppOps.checkPackage(callingUid, callingPackage);
|
||||
|
||||
final SubscriptionManager sm;
|
||||
final SubscriptionInfo si;
|
||||
final PersistableBundle config;
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
si = mContext.getSystemService(SubscriptionManager.class)
|
||||
.getActiveSubscriptionInfo(subId);
|
||||
sm = mContext.getSystemService(SubscriptionManager.class);
|
||||
si = sm.getActiveSubscriptionInfo(subId);
|
||||
config = mCarrierConfigManager.getConfigForSubId(subId);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
@@ -3060,7 +3061,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
|
||||
// First check: is caller the CarrierService?
|
||||
if (si != null) {
|
||||
if (si.isEmbedded() && si.canManageSubscription(mContext, callingPackage)) {
|
||||
if (si.isEmbedded() && sm.canManageSubscription(si, callingPackage)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user