From cc083922b9871f1ca522972f1bafc8060a55e32e Mon Sep 17 00:00:00 2001 From: Ecco Park Date: Fri, 5 Apr 2019 16:50:19 -0700 Subject: Passpoint: allow Carrier Provisioning App to remove Passpoint profile. Whenever sim is inserted/deleted, the app needs to add/remove the profiles for the carrier. Bug: 130053265 Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I3c232c7f3d6404669a0b4594f845b72710eae909 Signed-off-by: Ecco Park --- service/java/com/android/server/wifi/WifiServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index 5a5bc1824..f1f3d6cd1 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -2299,8 +2299,9 @@ public class WifiServiceImpl extends BaseWifiService { */ @Override public boolean removePasspointConfiguration(String fqdn, String packageName) { - if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.NETWORK_SETTINGS) - != PERMISSION_GRANTED) { + final int uid = Binder.getCallingUid(); + if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(uid) + && !mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(uid)) { if (mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q)) { return false; } -- cgit v1.2.3