mirror of
https://github.com/TanelOrumaa/Estonian-ID-card-mobile-authenticator-POC.git
synced 2024-12-22 20:40:16 +02:00
MOB-14 two small fixes
This commit is contained in:
parent
cc35723c07
commit
76fecd766f
@ -6,6 +6,7 @@ import android.nfc.NfcAdapter
|
|||||||
import android.nfc.tech.IsoDep
|
import android.nfc.tech.IsoDep
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.CountDownTimer
|
import android.os.CountDownTimer
|
||||||
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
@ -78,14 +79,12 @@ class AuthFragment : Fragment() {
|
|||||||
try {
|
try {
|
||||||
val comms = Comms(it, viewModel.userCan)
|
val comms = Comms(it, viewModel.userCan)
|
||||||
val response = comms.readPersonalData(byteArrayOf(1, 2, 6))
|
val response = comms.readPersonalData(byteArrayOf(1, 2, 6))
|
||||||
if (response != null) {
|
|
||||||
viewModel.setUserFirstName(response[1])
|
viewModel.setUserFirstName(response[1])
|
||||||
viewModel.setUserLastName(response[0])
|
viewModel.setUserLastName(response[0])
|
||||||
viewModel.setUserIdentificationNumber(response[2])
|
viewModel.setUserIdentificationNumber(response[2])
|
||||||
requireActivity().runOnUiThread{
|
requireActivity().runOnUiThread{
|
||||||
binding!!.timeCounter.text = getString(R.string.data_read)
|
binding!!.timeCounter.text = getString(R.string.data_read)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
requireActivity().runOnUiThread {
|
requireActivity().runOnUiThread {
|
||||||
binding!!.timeCounter.text = getString(R.string.no_success)
|
binding!!.timeCounter.text = getString(R.string.no_success)
|
||||||
@ -94,7 +93,6 @@ class AuthFragment : Fragment() {
|
|||||||
Thread.sleep(1000)
|
Thread.sleep(1000)
|
||||||
goToTheStart()
|
goToTheStart()
|
||||||
} finally {
|
} finally {
|
||||||
it.close()
|
|
||||||
adapter.disableReaderMode(activity)
|
adapter.disableReaderMode(activity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user