ui: fix SDK 30 deprecation warning for implicit Looper in Handler init

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-08-23 01:03:40 +05:30
parent 898bb679d2
commit dcd91cad1b
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80

View File

@ -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()