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

Commit c685f505 authored by Junyu Lai's avatar Junyu Lai
Browse files

Fix onBlockedStatusChanged does not work on multiple networks

There is a logic error in maybeNotifyNetworkBlockedForNewUidRules
that caused function to return if there is no status change in
the first network. This would cause CTS failed in devices which
has volte-enabled SIM inserted.

Bug: 129409153
Fix: 117969394
Test: 1. atest com.android.cts.net.HostsideNetworkCallbackTests \
         --generate-new-metrics 20
      2. atest FrameworksNetTests

Change-Id: I11168fd07a7c29e0605f2e874e9d9f41b5ad88b6
Merged-In: Ifd18d1c6ad708c1dbc793f03d8241f572af50317
(cherry picked from commit 794f01c7)
parent 21df0436
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6543,7 +6543,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
                        uid, newRules, metered, mRestrictBackground);
            }
            if (oldBlocked == newBlocked) {
                return;
                continue;
            }
            final int arg = encodeBool(newBlocked);
            for (int i = 0; i < nai.numNetworkRequests(); i++) {