Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2e45e16c authored by Aaron Huang's avatar Aaron Huang
Browse files

Have NetworkPolicyManagerService listen onLinkPropertiesChanged callback

In current design, NPMS listens onThresholdReached() callback to
call updateNetworkRulesNL(), however, this callback mwill not be
called if data usage is not updated. Thus, it will cause to no
iptables rule for new metered interfaces.

Have NPMS listen onLinkProperitesChanged() callback and call
updateNetworkRulesNL() if interfaces has changed to add iptables
rules for new metered interfaces.

Bug: 225971066
Test: HostsideRestrictBackgroundNetworkTests
      HostsideRestrictBackgroundNetworkTests# \
      testDataAndBatterySaverModes_meteredNetwork \
      --iterations 100
Change-Id: I49f999efc3fbe0a6a325ec138a3f060c7285e6ad
parent a2271921
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment