diff options
author | Allan Wang <me@allanwang.ca> | 2019-05-21 12:08:23 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-05-21 12:08:23 -0700 |
commit | a0b16ab0d8886934f7d29403420ce30e791e7119 (patch) | |
tree | 297ae0ed956050adc5f3205a6d6673b2a02b5c58 /core/src/main/kotlin/ca | |
parent | 83bc96c0629a2e50352b177ce6a28b6f9141db69 (diff) | |
download | kau-a0b16ab0d8886934f7d29403420ce30e791e7119.tar.gz kau-a0b16ab0d8886934f7d29403420ce30e791e7119.tar.bz2 kau-a0b16ab0d8886934f7d29403420ce30e791e7119.zip |
Deprecate network utils
Diffstat (limited to 'core/src/main/kotlin/ca')
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt | 3 |
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() { |