aboutsummaryrefslogtreecommitdiff
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
parent83bc96c0629a2e50352b177ce6a28b6f9141db69 (diff)
downloadkau-a0b16ab0d8886934f7d29403420ce30e791e7119.tar.gz
kau-a0b16ab0d8886934f7d29403420ce30e791e7119.tar.bz2
kau-a0b16ab0d8886934f7d29403420ce30e791e7119.zip
Deprecate network utils
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt3
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml4
2 files changed, 7 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() {
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index d78fcea..1edb48e 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -6,6 +6,10 @@
<item text="" />
-->
+ <version title="v4.1.0" />
+ <item text=":core: Deprecate NetworkUtils, as the underlying functions are deprecated" />
+ <item text="" />
+
<version title="v4.0.0" />
<item text="Update translations" />