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

Commit f511ec9a authored by Chalard Jean's avatar Chalard Jean
Browse files

Use registerIgnoringScore

NetworkFactory has a method to see all requests regardless
of the score. This is more robust and future-proof than
setting a legacy int of 101 – there is no guarantee no
agent will ever set more than 101 (in fact, VPNs already set
101, so this is already brittle).

Bug: 184831106
Test: FrameworksTelephonyTests
Change-Id: I0acb338d608016f2e144685f9088bf1384dea25f
parent c30a4d38
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -459,8 +459,7 @@ public class PhoneSwitcher extends Handler {
        NetworkFactory networkFactory = new PhoneSwitcherNetworkRequestListener(looper, context,
                builder.build(), this);
        // we want to see all requests
        networkFactory.setScoreFilter(101);
        networkFactory.register();
        networkFactory.registerIgnoringScore();

        log("PhoneSwitcher started");
    }