Allow ethernet on automotive to set allowed UIDs

Allow ethernet factories on automotive devices to set the allowed UIDs
on NetworkCapabilities.

Bug: 229419469
Test: atest FrameworksNetTests
Change-Id: I03e7cda75f1c530e0d0e4a756330bc9847a96668
This commit is contained in:
James Mattis
2022-04-21 15:31:52 -07:00
parent 105962ed14
commit 46491d7546
3 changed files with 68 additions and 28 deletions

View File

@@ -7825,6 +7825,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
}
nai.declaredCapabilities = new NetworkCapabilities(nc);
NetworkAgentInfo.restrictCapabilitiesFromNetworkAgent(nc, nai.creatorUid,
mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE),
mCarrierPrivilegeAuthenticator);
}