Calls setUidFirewallRules() and enableFirewallChain() asynchronously.
The updateRulesForRestrictPowerUL() method is used to set the power-related restrictions for all apps and it ends up by calling NetworkManagerService twice (and each call spawns an iptables process, which takes ~50ms to complete). This method is called on some critical paths, like when the device leaves Doze Light mode. This change makes these calls asynchronously, hence reducing the delay on such critical paths in the O(100ms). BUG: 31281543 Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests Change-Id: If720a7112c72a18193ea9614ae187b7ed9c741ec (cherry picked from commit 84d3973d)
Loading
Please register or sign in to comment