Merge "Revert "Partially enforce permission when calling getNetworkInfoForUid""

This commit is contained in:
Treehugger Robot
2022-11-10 12:13:56 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 46 deletions

View File

@@ -1983,9 +1983,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
@Nullable
public NetworkInfo getNetworkInfoForUid(Network network, int uid, boolean ignoreBlocked) {
enforceAccessPermission();
if (uid != mDeps.getCallingUid()) {
enforceNetworkStackPermission(mContext);
}
final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
if (nai == null) return null;
return getFilteredNetworkInfo(nai, uid, ignoreBlocked);