List of usage examples for android.net NetworkCapabilities NET_CAPABILITY_VALIDATED
int NET_CAPABILITY_VALIDATED
To view the source code for android.net NetworkCapabilities NET_CAPABILITY_VALIDATED.
Click Source Link
From source file:androidx.work.impl.constraints.trackers.NetworkStateTracker.java
private boolean isActiveNetworkValidated() { if (Build.VERSION.SDK_INT < 23) { return false; // NET_CAPABILITY_VALIDATED not available until API 23. Used on API 26+. }//from w ww . j av a 2 s. c o m Network network = mConnectivityManager.getActiveNetwork(); NetworkCapabilities capabilities = mConnectivityManager.getNetworkCapabilities(network); return capabilities != null && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED); }