File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
WordPressUtils/src/main/java/org/wordpress/android/util Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 11package org .wordpress .android .util ;
22
3+ import android .annotation .TargetApi ;
34import android .content .Context ;
45import android .net .ConnectivityManager ;
56import android .net .NetworkInfo ;
67import android .os .Build ;
8+ import android .os .Build .VERSION_CODES ;
79import android .provider .Settings ;
810
911/**
1012 * requires android.permission.ACCESS_NETWORK_STATE
1113 */
14+
1215public class NetworkUtils {
1316 public static final int TYPE_UNKNOWN = -1 ;
1417
@@ -57,6 +60,8 @@ public static boolean isWiFiConnected(Context context) {
5760 /**
5861 * returns true if airplane mode has been enabled
5962 */
63+ @ TargetApi (VERSION_CODES .JELLY_BEAN_MR1 )
64+ @ SuppressWarnings ("deprecation" )
6065 public static boolean isAirplaneModeOn (Context context ) {
6166 // prior to JellyBean 4.2 this was Settings.System.AIRPLANE_MODE_ON, JellyBean 4.2
6267 // moved it to Settings.Global
You can’t perform that action at this time.
0 commit comments