Merge "Partially enforce permission when calling getNetworkInfoForUid"
This commit is contained in:
commit
d577c39663
1 changed files with 46 additions and 4 deletions
|
|
@ -1982,6 +1982,9 @@ 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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue