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: Ifd18d1c6ad708c1dbc793f03d8241f572af50317
This commit is contained in:
junyulai
2019-04-08 16:58:22 +08:00
parent 1470d8a3b8
commit 7509e6e053

View File

@@ -6554,7 +6554,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++) {