Merge "Check NETWORK_SETTINGS permission for getAllNetworkStateSnapshots" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6f0f141cd5
@@ -2213,7 +2213,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
@NonNull
|
@NonNull
|
||||||
public List<NetworkStateSnapshot> getAllNetworkStateSnapshots() {
|
public List<NetworkStateSnapshot> getAllNetworkStateSnapshots() {
|
||||||
// This contains IMSI details, so make sure the caller is privileged.
|
// This contains IMSI details, so make sure the caller is privileged.
|
||||||
PermissionUtils.enforceNetworkStackPermission(mContext);
|
enforceNetworkStackOrSettingsPermission();
|
||||||
|
|
||||||
final ArrayList<NetworkStateSnapshot> result = new ArrayList<>();
|
final ArrayList<NetworkStateSnapshot> result = new ArrayList<>();
|
||||||
for (Network network : getAllNetworks()) {
|
for (Network network : getAllNetworks()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user