diff options
| author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-01-15 19:14:45 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-01-15 19:14:45 +0000 |
| commit | b82103c366fcfd935af6df87ac0b77ed45fdb3d8 (patch) | |
| tree | 39c4db1069f6057714c2225f68449e7a5b488fb1 | |
| parent | 8e7ad14e76daab647092296095d6371e3ffceea9 (diff) | |
| parent | 13bfd977669318842e0d8a93046253a40ecd41ca (diff) | |
| download | platform_packages_services_AlternativeNetworkAccess-b82103c366fcfd935af6df87ac0b77ed45fdb3d8.tar.gz platform_packages_services_AlternativeNetworkAccess-b82103c366fcfd935af6df87ac0b77ed45fdb3d8.tar.bz2 platform_packages_services_AlternativeNetworkAccess-b82103c366fcfd935af6df87ac0b77ed45fdb3d8.zip | |
Refactor TelephonyPermission Method in AlternativeNetworkAccess am: 43138a18a6 am: 13bfd97766
Change-Id: I26832e18c88e09cff2b9d1d75a252fd7c738a3a2
| -rw-r--r-- | src/com/android/ons/OpportunisticNetworkService.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/ons/OpportunisticNetworkService.java b/src/com/android/ons/OpportunisticNetworkService.java index 8387a2d..2ea684c 100644 --- a/src/com/android/ons/OpportunisticNetworkService.java +++ b/src/com/android/ons/OpportunisticNetworkService.java @@ -230,10 +230,10 @@ public class OpportunisticNetworkService extends Service { ISetOpportunisticDataCallback callbackStub, String callingPackage) { logDebug("setPreferredDataSubscriptionId subId:" + subId + "callingPackage: " + callingPackage); if (!enforceModifyPhoneStatePermission(mContext)) { - TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege( + TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege(mContext, mSubscriptionManager.getDefaultSubscriptionId(), "setPreferredDataSubscriptionId"); if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { - TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege(subId, + TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege(mContext, subId, "setPreferredDataSubscriptionId"); } } else { @@ -306,7 +306,7 @@ public class OpportunisticNetworkService extends Service { (ArrayList<AvailableNetworkInfo>) availableNetworks, callbackStub); } else { /* check if the app has primary carrier permission */ - TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege( + TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege(mContext, mSubscriptionManager.getDefaultSubscriptionId(), "updateAvailableNetworks"); handleCarrierAppAvailableNetworks( (ArrayList<AvailableNetworkInfo>) availableNetworks, callbackStub, @@ -418,7 +418,7 @@ public class OpportunisticNetworkService extends Service { if (Binder.withCleanCallingIdentity( () -> mSubscriptionManager.isActiveSubId( availableNetworkInfo.getSubId()))) { - TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege( + TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege(mContext, availableNetworkInfo.getSubId(), "updateAvailableNetworks"); } else { /* check if the app has opportunistic carrier permission */ |
