Remove NETWORK_STACK_UID check

NETWORK_STACK_UID check was introduced by aosp/1134635, and it
assumed that wifi factories/agents will be running on the network
stack process, but it didn't eventually. It runs in the system
server instead. So remove this check.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: Ie11268738e364e252f18876f7a4a0dc064ca8b9c
This commit is contained in:
lucaslin
2021-03-15 15:35:38 +08:00
committed by Lucas Lin
parent de22605a9a
commit 5aad7855a9

View File

@@ -3806,8 +3806,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
? mNetworkRequests.get(request) : getNriForAppRequest(request); ? mNetworkRequests.get(request) : getNriForAppRequest(request);
if (nri != null) { if (nri != null) {
if (Process.SYSTEM_UID != callingUid && Process.NETWORK_STACK_UID != callingUid if (Process.SYSTEM_UID != callingUid && nri.mUid != callingUid) {
&& nri.mUid != callingUid) {
log(String.format("UID %d attempted to %s for unowned request %s", log(String.format("UID %d attempted to %s for unowned request %s",
callingUid, requestedOperation, nri)); callingUid, requestedOperation, nri));
return null; return null;