Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: net/android/java/src/org/chromium/net/NetworkChangeNotifier.java

Issue 2486393004: Expose API to detect when captive portal probe was blocked on Android (Closed)
Patch Set: pauljensen comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/android/java/src/org/chromium/net/NetworkChangeNotifier.java
diff --git a/net/android/java/src/org/chromium/net/NetworkChangeNotifier.java b/net/android/java/src/org/chromium/net/NetworkChangeNotifier.java
index 20f1013801b8ccf44aed9e2dd7bd892b11d4369d..cfe547e1bae3ac7475ce550a7689dbfea42104b3 100644
--- a/net/android/java/src/org/chromium/net/NetworkChangeNotifier.java
+++ b/net/android/java/src/org/chromium/net/NetworkChangeNotifier.java
@@ -98,6 +98,17 @@ public class NetworkChangeNotifier {
}
/**
+ * Returns true if the captive portal probe was blocked for the current network.
pauljensen 2016/11/16 16:10:23 current->current default
+ * May incorrectly return true if the user has signed into the captive portal since the
+ * network was last probed.
+ * Only available on Lollipop and newer releases.
pauljensen 2016/11/16 16:10:23 Lollipop->Marshmallow
pauljensen 2016/11/16 16:10:23 Mention what is returned on older releases.
+ */
+ @CalledByNative
+ public boolean getCurrentNetworkCaptivePortal() {
+ return mAutoDetector == null ? false : mAutoDetector.getCurrentNetworkCaptivePortal();
+ }
+
+ /**
* Returns an array of all of the device's currently connected
* networks and ConnectionTypes. Array elements are a repeated sequence of:
* NetID of network

Powered by Google App Engine
This is Rietveld 408576698