Fix avoidBadWifi behavior with IPv6 provisioning

IPv6 provisioning loss should be ignored when avoidBadWifi is false, not

Bug: 139023420
Test: with avoidBadWifi=false, when connected to a mobile hotspot that
      loses connectivity, WiFi does not disconnect anymore
Merged-In: I18dc13083a7af4ed8bf95fbbf7dce0ecb9abaa14
(cherry picked from commit 01d68c56d9be5970a1df3ac1db05c5b6e63ba615)

Change-Id: I5bea86e0b5733bff7428f0b40c8a6a1907a1e825
(cherry picked from commit cc246e6c3f240cf2b51635fc6c762dd75ea67fb8)
diff --git a/src/android/net/ip/ b/src/android/net/ip/
index 266b1b0..ad9accc 100644
--- a/src/android/net/ip/
+++ b/src/android/net/ip/
@@ -934,7 +934,7 @@
         // accompanying code in IpReachabilityMonitor) is unreachable.
         final boolean ignoreIPv6ProvisioningLoss =
                 mConfiguration != null && mConfiguration.mUsingMultinetworkPolicyTracker
-                && mCm.shouldAvoidBadWifi();
+                && !mCm.shouldAvoidBadWifi();
         // Additionally: