List of usage examples for android.net ConnectivityManager isNetworkSupported
@Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562) public boolean isNetworkSupported(int networkType)
From source file:com.android.tv.settings.about.AboutFragment.java
public static boolean isWifiOnly(Context context) { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); return (!cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)); }
From source file:com.mediatek.engineermode.EngineerMode.java
private boolean isWifiOnly() { ConnectivityManager connManager = (ConnectivityManager) EngineerMode.this .getSystemService(Context.CONNECTIVITY_SERVICE); boolean bWifiOnly = false; if (null != connManager) { bWifiOnly = !connManager.isNetworkSupported(ConnectivityManager.TYPE_MOBILE); Log.i("@M_" + TAG, "bWifiOnly: " + bWifiOnly); }/*w w w. j a v a2 s. c o m*/ return bWifiOnly; }