aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-05-21 12:08:23 -0700
committerAllan Wang <me@allanwang.ca>2019-05-21 12:08:23 -0700
commita0b16ab0d8886934f7d29403420ce30e791e7119 (patch)
tree297ae0ed956050adc5f3205a6d6673b2a02b5c58 /core/src/main
parent83bc96c0629a2e50352b177ce6a28b6f9141db69 (diff)
downloadkau-a0b16ab0d8886934f7d29403420ce30e791e7119.tar.gz
kau-a0b16ab0d8886934f7d29403420ce30e791e7119.tar.bz2
kau-a0b16ab0d8886934f7d29403420ce30e791e7119.zip
Deprecate network utils
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt
index 260e90f..32cf084 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt
@@ -22,6 +22,7 @@ import android.net.ConnectivityManager
/**
* Created by Allan Wang on 2017-07-07.
*/
+@Deprecated("Applications should make use of network callbacks instead of individual queries")
inline val Context.isNetworkAvailable: Boolean
@SuppressLint("MissingPermission")
get() {
@@ -30,6 +31,7 @@ inline val Context.isNetworkAvailable: Boolean
return activeNetworkInfo?.isConnectedOrConnecting ?: false
}
+@Deprecated("Applications should make use of network callbacks instead of individual queries")
inline val Context.isWifiConnected: Boolean
@SuppressLint("MissingPermission")
get() {
@@ -38,6 +40,7 @@ inline val Context.isWifiConnected: Boolean
return (activeNetworkInfo?.type ?: -1) == ConnectivityManager.TYPE_WIFI
}
+@Deprecated("Applications should make use of network callbacks instead of individual queries")
inline val Context.isMobileDataConnected: Boolean
@SuppressLint("MissingPermission")
get() {