Merge "Use java BpfMap in BpfNetMaps#replaceUidChain" am: 6bcb3c290c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2145584 Change-Id: I49e70a3e862b0eb66f3fc17d230c79e8784d2c54 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -11401,39 +11401,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
public void replaceFirewallChain(final int chain, final int[] uids) {
|
||||
enforceNetworkStackOrSettingsPermission();
|
||||
|
||||
try {
|
||||
switch (chain) {
|
||||
case ConnectivityManager.FIREWALL_CHAIN_DOZABLE:
|
||||
mBpfNetMaps.replaceUidChain("fw_dozable", true /* isAllowList */, uids);
|
||||
break;
|
||||
case ConnectivityManager.FIREWALL_CHAIN_STANDBY:
|
||||
mBpfNetMaps.replaceUidChain("fw_standby", false /* isAllowList */, uids);
|
||||
break;
|
||||
case ConnectivityManager.FIREWALL_CHAIN_POWERSAVE:
|
||||
mBpfNetMaps.replaceUidChain("fw_powersave", true /* isAllowList */, uids);
|
||||
break;
|
||||
case ConnectivityManager.FIREWALL_CHAIN_RESTRICTED:
|
||||
mBpfNetMaps.replaceUidChain("fw_restricted", true /* isAllowList */, uids);
|
||||
break;
|
||||
case ConnectivityManager.FIREWALL_CHAIN_LOW_POWER_STANDBY:
|
||||
mBpfNetMaps.replaceUidChain("fw_low_power_standby", true /* isAllowList */,
|
||||
uids);
|
||||
break;
|
||||
case ConnectivityManager.FIREWALL_CHAIN_OEM_DENY_1:
|
||||
mBpfNetMaps.replaceUidChain("fw_oem_deny_1", false /* isAllowList */, uids);
|
||||
break;
|
||||
case ConnectivityManager.FIREWALL_CHAIN_OEM_DENY_2:
|
||||
mBpfNetMaps.replaceUidChain("fw_oem_deny_2", false /* isAllowList */, uids);
|
||||
break;
|
||||
case ConnectivityManager.FIREWALL_CHAIN_OEM_DENY_3:
|
||||
mBpfNetMaps.replaceUidChain("fw_oem_deny_3", false /* isAllowList */, uids);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("replaceFirewallChain with invalid chain: "
|
||||
+ chain);
|
||||
}
|
||||
} catch (ServiceSpecificException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
mBpfNetMaps.replaceUidChain(chain, uids);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user