diff options
author | Ecco Park <eccopark@google.com> | 2019-04-05 16:50:19 -0700 |
---|---|---|
committer | Ecco Park <eccopark@google.com> | 2019-04-08 13:41:45 -0700 |
commit | cc083922b9871f1ca522972f1bafc8060a55e32e (patch) | |
tree | 83854fef2749f915cc720cb36a8d04970dd09a3f /service | |
parent | 89bce6ef926ea42e0b77b9098e8bb41b6568c4da (diff) |
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 <eccopark@google.com>
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |