Merge pull request #2548 from dlvoy/dagger3-otpfix

Fixed crash on pre-26 API due to lack of java.time.Duration in depenent OTP lib
This commit is contained in:
Milos Kozak 2020-04-05 10:04:59 +02:00 committed by GitHub
commit e664ee027d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
package info.nightscout.androidaps.plugins.general.smsCommunicator.otp
import android.util.Base64
import com.eatthepath.otp.TimeBasedOneTimePasswordGenerator
import com.eatthepath.otp.HmacOneTimePasswordGenerator
import com.google.common.io.BaseEncoding
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
@ -23,7 +23,7 @@ class OneTimePassword @Inject constructor(
private var key: SecretKey? = null
private var pin: String = ""
private val totp = TimeBasedOneTimePasswordGenerator()
private val totp = HmacOneTimePasswordGenerator()
init {
instance = this