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

Unified Diff: net/android/network_change_notifier_android.cc

Issue 1454313002: Adding platform support check for NetworkObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Addresses pauljensen's comments. Created 5 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/network_change_notifier_android.cc
diff --git a/net/android/network_change_notifier_android.cc b/net/android/network_change_notifier_android.cc
index eac6589a8ef23ce88c33298923c733f61d570806..d957181c557bc1bc5ddb3c762350803834911603 100644
--- a/net/android/network_change_notifier_android.cc
+++ b/net/android/network_change_notifier_android.cc
@@ -162,6 +162,13 @@ void NetworkChangeNotifierAndroid::GetCurrentMaxBandwidthAndConnectionType(
connection_type);
}
+bool NetworkChangeNotifierAndroid::AreNetworkHandlesCurrentlySupported() const {
+ // Notifications for API using NetworkHandles and querying using
+ // NetworkHandles only implemented for Android versions >= L.
+ return base::android::BuildInfo::GetInstance()->sdk_int() >=
+ base::android::SDK_VERSION_LOLLIPOP;
+}
+
void NetworkChangeNotifierAndroid::GetCurrentConnectedNetworks(
NetworkChangeNotifier::NetworkList* networks) const {
delegate_->GetCurrentlyConnectedNetworks(networks);

Powered by Google App Engine
This is Rietveld 408576698