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

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

Change-Id: Ib259c6351471aca6656dc4d46bb7242228a226c2
This commit is contained in:
TreeHugger Robot
2021-05-20 04:21:42 +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()) {