Merge "Check NETWORK_SETTINGS permission for getAllNetworkStateSnapshots" into sc-dev am: 6f0f141cd5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14601670

Change-Id: Ieb5a7a764a5b7fc327af0aeda0c2db51b6e6187c
This commit is contained in:
TreeHugger Robot
2021-05-20 04:23:26 +00:00
committed by Automerger Merge Worker

View File

@@ -2213,7 +2213,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
@NonNull
public List<NetworkStateSnapshot> getAllNetworkStateSnapshots() {
// This contains IMSI details, so make sure the caller is privileged.
PermissionUtils.enforceNetworkStackPermission(mContext);
enforceNetworkStackOrSettingsPermission();
final ArrayList<NetworkStateSnapshot> result = new ArrayList<>();
for (Network network : getAllNetworks()) {