diff options
author | Torsten Grote <t@grobox.de> | 2021-10-12 09:54:38 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2021-10-12 09:54:38 -0300 |
commit | b55354d507668722fcc4c262cfbc8c60003f650e (patch) | |
tree | 5bd60b65ad9c4a854ff48d3944a6d5a546b23919 /wallet | |
parent | 2577c2de4bf48841124e9d94724d31e6ac7d2c72 (diff) | |
download | taler-android-b55354d507668722fcc4c262cfbc8c60003f650e.tar.gz taler-android-b55354d507668722fcc4c262cfbc8c60003f650e.tar.bz2 taler-android-b55354d507668722fcc4c262cfbc8c60003f650e.zip |
Upgrade to fixed akono release
Diffstat (limited to 'wallet')
-rw-r--r-- | wallet/build.gradle | 6 | ||||
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/backend/WalletBackendService.kt | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/wallet/build.gradle b/wallet/build.gradle index e77b6fe..9a5f8ef 100644 --- a/wallet/build.gradle +++ b/wallet/build.gradle @@ -47,8 +47,8 @@ android { applicationId "net.taler.wallet" minSdkVersion 21 targetSdkVersion 30 - versionCode 9 - versionName "v0.8.1" + versionCode 10 + versionName "v0.8.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" buildConfigField "String", "WALLET_CORE_VERSION", "\"$walletCoreVersion\"" } @@ -111,7 +111,7 @@ android { dependencies { implementation project(":taler-kotlin-android") implementation project(":anastasis-ui") - implementation 'net.taler:akono:0.1' + implementation 'net.taler:akono:0.2' implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" diff --git a/wallet/src/main/java/net/taler/wallet/backend/WalletBackendService.kt b/wallet/src/main/java/net/taler/wallet/backend/WalletBackendService.kt index 8312d9b..f99f38d 100644 --- a/wallet/src/main/java/net/taler/wallet/backend/WalletBackendService.kt +++ b/wallet/src/main/java/net/taler/wallet/backend/WalletBackendService.kt @@ -17,7 +17,6 @@ package net.taler.wallet.backend -import akono.AkonoJni import android.app.Service import android.content.Intent import android.os.Handler @@ -26,6 +25,7 @@ import android.os.Message import android.os.Messenger import android.os.RemoteException import android.util.Log +import net.taler.akono.AkonoJni import net.taler.wallet.BuildConfig.WALLET_CORE_VERSION import net.taler.wallet.HostCardEmulatorService import org.json.JSONObject @@ -75,7 +75,6 @@ class WalletBackendService : Service() { akono.evalNodeCode("tw = require('@gnu-taler/taler-wallet-embedded');") akono.evalNodeCode("tw.installNativeWalletListener();") sendInitMessage() - initialized = true super.onCreate() } @@ -92,13 +91,14 @@ class WalletBackendService : Service() { * Handler of incoming messages from clients. */ class IncomingHandler( - service: WalletBackendService + service: WalletBackendService, ) : Handler() { private val serviceWeakRef = WeakReference(service) override fun handleMessage(msg: Message) { val svc = serviceWeakRef.get() ?: return + if (!svc.initialized) Log.w(TAG, "Warning: Not yet initialized") when (msg.what) { MSG_COMMAND -> { val data = msg.data @@ -203,7 +203,8 @@ class WalletBackendService : Service() { "response" -> { when (message.getString("operation")) { "init" -> { - Log.v(TAG, "got response for init operation: ${message.toString(2)}") + Log.d(TAG, "got response for init operation: ${message.toString(2)}") + initialized = true sendNotify(message.toString(2)) } "reset" -> { |