Use batching to set firewall rules.

Netd now provides an option to flush all uids for a given firewall
chain. Using this option is particularly useful when setting the
fw_standby chain, since over time the device will have dozens of idle
apps.

For example, in a Nexus 5X with 45 idle apps, setFirewallUidRules() at
boot was taking 1044ms, and after this change it dropped to just 32ms.

BUG: 26675191
Change-Id: I7016ba646b872f80d0b27a56b867c0b6080d2516
1 file changed