summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-08-23 01:03:40 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-08-23 01:03:49 +0530
commitdcd91cad1bcc04e07d26df4de99959bc9cd021c7 (patch)
treeed5e21e64c3a3e966fe6275997459982054008f8
parent898bb679d2a6191afe15cebf59a0f60fe76385cb (diff)
ui: fix SDK 30 deprecation warning for implicit Looper in Handler init
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r--ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt b/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt
index aed8a4f2..724c8b95 100644
--- a/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt
+++ b/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt
@@ -10,6 +10,7 @@ import android.app.KeyguardManager
import android.content.Context
import android.os.Build
import android.os.Handler
+import android.os.Looper
import android.util.Log
import androidx.annotation.StringRes
import androidx.biometric.BiometricConstants
@@ -22,7 +23,7 @@ import com.wireguard.android.R
object BiometricAuthenticator {
private const val TAG = "WireGuard/BiometricAuthenticator"
- private val handler = Handler()
+ private val handler = Handler(Looper.getMainLooper())
sealed class Result {
data class Success(val cryptoObject: BiometricPrompt.CryptoObject?) : Result()