From 485abe4aed1c8c34ba4245b611678f92af7da528 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Tue, 2 Sep 2014 16:35:42 +0200 Subject: [PATCH] fix lint error in utils --- .../main/java/org/wordpress/android/util/NetworkUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/NetworkUtils.java b/WordPressUtils/src/main/java/org/wordpress/android/util/NetworkUtils.java index 783697a16b92..1ea1a60f2d77 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/NetworkUtils.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/NetworkUtils.java @@ -1,14 +1,17 @@ package org.wordpress.android.util; +import android.annotation.TargetApi; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Build; +import android.os.Build.VERSION_CODES; import android.provider.Settings; /** * requires android.permission.ACCESS_NETWORK_STATE */ + public class NetworkUtils { public static final int TYPE_UNKNOWN = -1; @@ -57,6 +60,8 @@ public static boolean isWiFiConnected(Context context) { /** * returns true if airplane mode has been enabled */ + @TargetApi(VERSION_CODES.JELLY_BEAN_MR1) + @SuppressWarnings("deprecation") public static boolean isAirplaneModeOn(Context context) { // prior to JellyBean 4.2 this was Settings.System.AIRPLANE_MODE_ON, JellyBean 4.2 // moved it to Settings.Global