aboutsummaryrefslogtreecommitdiff
path: root/taler-kotlin-android
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2022-06-20 14:12:24 -0300
committerTorsten Grote <t@grobox.de>2022-06-20 14:12:24 -0300
commit0450b57c2d2104226196878a9e7217fe6eb3730e (patch)
treebdb498f62fb17b651effdda1df8038f3817564f2 /taler-kotlin-android
parent5b7bb5cf012fc41b2fbb6a41f6f858009c1ba092 (diff)
downloadtaler-android-0450b57c2d2104226196878a9e7217fe6eb3730e.tar.gz
taler-android-0450b57c2d2104226196878a9e7217fe6eb3730e.tar.bz2
taler-android-0450b57c2d2104226196878a9e7217fe6eb3730e.zip
Fix lint and CI issues
Note that I only fixes the most grave things that made things fail. I didn't address all issues introduces lately nor making sure the targetSdk bump to 32 has no unintented side-effects.
Diffstat (limited to 'taler-kotlin-android')
-rw-r--r--taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt
index 5b57320..7dde872 100644
--- a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt
+++ b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt
@@ -16,6 +16,7 @@
package net.taler.common
+import android.Manifest.permission.ACCESS_NETWORK_STATE
import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Context.CONNECTIVITY_SERVICE
@@ -40,6 +41,7 @@ import android.view.View
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.view.inputmethod.InputMethodManager
+import androidx.annotation.RequiresPermission
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat.getSystemService
import androidx.fragment.app.Fragment
@@ -82,6 +84,7 @@ fun assertUiThread() {
val <T> T.exhaustive: T
get() = this
+@RequiresPermission(ACCESS_NETWORK_STATE)
fun Context.isOnline(): Boolean {
val cm = getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager
return if (SDK_INT < 29) {