summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2021-10-12 09:54:38 -0300
committerTorsten Grote <t@grobox.de>2021-10-12 09:54:38 -0300
commitb55354d507668722fcc4c262cfbc8c60003f650e (patch)
tree5bd60b65ad9c4a854ff48d3944a6d5a546b23919
parent2577c2de4bf48841124e9d94724d31e6ac7d2c72 (diff)
downloadtaler-android-b55354d507668722fcc4c262cfbc8c60003f650e.tar.gz
taler-android-b55354d507668722fcc4c262cfbc8c60003f650e.tar.bz2
taler-android-b55354d507668722fcc4c262cfbc8c60003f650e.zip
Upgrade to fixed akono release
-rw-r--r--.idea/codeStyles/Project.xml13
-rw-r--r--build.gradle6
-rw-r--r--wallet/build.gradle6
-rw-r--r--wallet/src/main/java/net/taler/wallet/backend/WalletBackendService.kt9
4 files changed, 12 insertions, 22 deletions
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 587f132..28083bf 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -2,18 +2,7 @@
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
- <value>
- <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
- </value>
- </option>
- <option name="PACKAGES_IMPORT_LAYOUT">
- <value>
- <package name="" alias="false" withSubpackages="true" />
- <package name="java" alias="false" withSubpackages="true" />
- <package name="javax" alias="false" withSubpackages="true" />
- <package name="kotlin" alias="false" withSubpackages="true" />
- <package name="" alias="true" withSubpackages="true" />
- </value>
+ <value />
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
diff --git a/build.gradle b/build.gradle
index 87765ad..06bd425 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,10 @@
buildscript {
- ext.kotlin_version = '1.5.30'
+ ext.kotlin_version = '1.5.31'
ext.ktor_version = "1.6.3"
ext.nav_version = "2.3.5"
ext.material_version = "1.4.0"
ext.lifecycle_version = "2.3.1"
- ext.constraintlayout_version = "2.1.0"
+ ext.constraintlayout_version = "2.1.1"
ext.junit_version = "4.13.2"
// check https://android-rebuilds.beuc.net/ for availability of free build tools
ext.build_tools_version = "30.0.3"
@@ -15,7 +15,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.0.1'
+ classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
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" -> {