Numéros formatés dans les QR codes

This commit is contained in:
odrling 2018-01-10 17:54:07 +01:00
parent 73900edd1b
commit b9d3b44a64
2 changed files with 3 additions and 4 deletions

View file

@ -3,7 +3,6 @@ package xyz.johnny.norntalk
import android.annotation.SuppressLint
import android.content.Intent
import android.os.AsyncTask
import android.os.AsyncTask.THREAD_POOL_EXECUTOR
import android.telephony.PhoneNumberUtils
import android.util.Log
import android.view.View
@ -68,7 +67,7 @@ class ComposeActivity : ComposeView.SendActivity() {
this@ComposeActivity.startActivity(intent)
}
}.executeOnExecutor(THREAD_POOL_EXECUTOR)
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR)
}

View file

@ -21,6 +21,7 @@ import android.widget.Toast
import com.google.zxing.BarcodeFormat
import org.bouncycastle.util.encoders.Hex
import xyz.johnny.norntalk.R
import xyz.johnny.norntalk.messages.NornContact
import xyz.johnny.norntalk.messages.NornMessage
import java.util.*
@ -124,7 +125,7 @@ object QRCode {
if (result) {
// transmettre le numéro de téléphone
synchronized(numberObj) {
numberObj.number = tmpNumber
numberObj.number = NornContact.format(tmpNumber, context)
alertDialog.dismiss()
numberObj.notifyAll()
}
@ -247,7 +248,6 @@ object QRCode {
return QRencoder.encodeBitmap(content, BarcodeFormat.QR_CODE, 512, 512)
}
/**
* Méthode appelé à la réception de chaque message afin de vérifier si message reçu est
* présent dans l'association jeton/clé.