From 4daca12061b1a6cb7610b69a95e1d95ff2230980 Mon Sep 17 00:00:00 2001 From: geeksville Date: Sun, 20 Sep 2020 20:40:15 -0700 Subject: [PATCH 1/4] update libs --- app/build.gradle | 4 ++-- build.gradle | 4 ++-- geeksville-androidlib | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 47909d9b9..bae82088c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -136,7 +136,7 @@ dependencies { // For now I'm not using javalite, because I want JSON printing //implementation 'com.google.protobuf:protobuf-java:3.11.1' //implementation 'com.google.protobuf:protobuf-java-util:3.11.1' - implementation 'com.google.protobuf:protobuf-javalite:3.12.2' + implementation 'com.google.protobuf:protobuf-javalite:3.13.0' // For UART access // implementation 'com.google.android.things:androidthings:1.0' @@ -146,7 +146,7 @@ dependencies { implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.1' // mapbox specifies a really old version of okhttp3 which causes lots of API warnings. trying a newer version - implementation 'com.squareup.okhttp3:okhttp:4.8.1' + implementation 'com.squareup.okhttp3:okhttp:4.9.0' // location services implementation 'com.google.android.gms:play-services-location:17.0.0' diff --git a/build.gradle b/build.gradle index 70a2cdb51..20fef1900 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.0' + ext.kotlin_version = '1.4.10' ext.coroutines_version = "1.3.9" repositories { @@ -21,7 +21,7 @@ buildscript { // Check that you have the Google Services Gradle plugin v4.3.2 or later // (if not, add it). classpath 'com.google.gms:google-services:4.3.3' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0' // protobuf plugin - docs here https://github.com/google/protobuf-gradle-plugin classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12' diff --git a/geeksville-androidlib b/geeksville-androidlib index 775502e99..af1a758b0 160000 --- a/geeksville-androidlib +++ b/geeksville-androidlib @@ -1 +1 @@ -Subproject commit 775502e999b06c1e8effbfd631b1924d998b0570 +Subproject commit af1a758b0d4ed0b98e412d0aa03195d30f95127a From b2970a7657f119c031d7da8836ce7141fd48f5e0 Mon Sep 17 00:00:00 2001 From: geeksville Date: Mon, 21 Sep 2020 14:41:12 -0700 Subject: [PATCH 2/4] include korean in release build --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index bae82088c..373dd1b3a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ android { defaultConfig { // We have to list all translated languages here, because some of our libs have bogus languages that google play // doesn't like and we need to strip them (gr) - resConfigs "cs", "de", "el", "en", "es", "fi", "fr", "ga", "ht", "it", "ja", "nl", "no", "pt", "ro", "ru", "sk", "sl", "sq", "sv", "tr", "zh" + resConfigs "cs", "de", "el", "en", "es", "fi", "fr", "ga", "ht", "it", "ja", "ko", "nl", "no", "pt", "ro", "ru", "sk", "sl", "sq", "sv", "tr", "zh" // Needed to make mapbox work inside the firebase testlab - FIXME, alas, still doesn't work ndk { From 83ea33d44b8ac7c78ec62e3605ecf96f82d907a5 Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 22 Sep 2020 12:52:15 -0700 Subject: [PATCH 3/4] fix a rare (probably harmless) autobug: "meshService was supposed to be null" --- .../java/com/geeksville/mesh/MainActivity.kt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/MainActivity.kt b/app/src/main/java/com/geeksville/mesh/MainActivity.kt index 00bdf9dd3..2c774ddc9 100644 --- a/app/src/main/java/com/geeksville/mesh/MainActivity.kt +++ b/app/src/main/java/com/geeksville/mesh/MainActivity.kt @@ -735,6 +735,8 @@ class MainActivity : AppCompatActivity(), Logging, } } + private var connectionJob: Job? = null + private val mesh = object : ServiceClient({ @@ -777,7 +779,7 @@ class MainActivity : AppCompatActivity(), Logging, at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1076) */ - mainScope.handledLaunch { + connectionJob = mainScope.handledLaunch { model.meshService = service usbDevice?.let { usb -> @@ -813,6 +815,7 @@ class MainActivity : AppCompatActivity(), Logging, } debug("connected to mesh service, isConnected=${model.isConnected.value}") + connectionJob = null } } @@ -825,8 +828,12 @@ class MainActivity : AppCompatActivity(), Logging, private fun bindMeshService() { debug("Binding to mesh service!") // we bind using the well known name, to make sure 3rd party apps could also - if (model.meshService != null) + if (model.meshService != null) { + /* This problem can occur if we unbind, but there is already an onConnected job waiting to run. That job runs and then makes meshService != null again + I think I've fixed this by cancelling connectionJob. We'll see! + */ Exceptions.reportError("meshService was supposed to be null, ignoring (but reporting a bug)") + } try { MeshService.startService(this) // Start the service so it stays running even after we unbind @@ -844,6 +851,11 @@ class MainActivity : AppCompatActivity(), Logging, // it, then now is the time to unregister. // if we never connected, do nothing debug("Unbinding from mesh service!") + connectionJob?.let { job -> + connectionJob = null + warn("We had a pending onConnection job, so we are cancelling it") + job.cancel("unbinding") + } mesh.close() model.meshService = null } From 82dce7f564fea86ce283e6c72bc6a6f5b6219398 Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 22 Sep 2020 12:56:20 -0700 Subject: [PATCH 4/4] 1.1.0 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 373dd1b3a..ec5815b9b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "com.geeksville.mesh" minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works) targetSdkVersion 29 - versionCode 20000 // format is Mmmss (where M is 1+the numeric major number - versionName "1.0.00" + versionCode 20100 // format is Mmmss (where M is 1+the numeric major number + versionName "1.1.00" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes {