From 4c19b2006eb5e1b7ae90595beea5aeaf6104025e Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Sun, 7 Nov 2021 23:25:22 +0100 Subject: [PATCH 1/2] Fix ANR in Profile Helper by moving slow TDD calc into separate thread #868 --- .../androidaps/activities/ProfileHelperActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt index 47b574ad33..eb69d5658f 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt @@ -168,7 +168,11 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() { binding.basalpctfromtdd.setParams(32.0, 32.0, 37.0, 1.0, DecimalFormat("0"), false, null) - binding.tdds.text = tddCalculator.stats() + binding.tdds.text = getString(R.string.tdd) + ": " + rh.gs(R.string.calculation_in_progress); + Thread { + val tdds = tddCalculator.stats() + runOnUiThread { binding.tdds.text = tdds } + }.start() // Current profile binding.currentProfileText.text = profileFunction.getProfileName() From 4260dbc9da89c8432d8aeca1588f83f55c5f7e06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 08:07:41 +0000 Subject: [PATCH 2/2] Bump byteBuddyVersion from 1.11.22 to 1.12.0 Bumps `byteBuddyVersion` from 1.11.22 to 1.12.0. Updates `byte-buddy` from 1.11.22 to 1.12.0 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.11.22...byte-buddy-1.12.0) Updates `byte-buddy-android` from 1.11.22 to 1.12.0 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.11.22...byte-buddy-1.12.0) Updates `byte-buddy-agent` from 1.11.22 to 1.12.0 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.11.22...byte-buddy-1.12.0) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: net.bytebuddy:byte-buddy-android dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: net.bytebuddy:byte-buddy-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7205c0602d..4a59385c49 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ buildscript { dexmakerVersion = "1.2" retrofit2Version = '2.9.0' okhttp3Version = '4.9.0' - byteBuddyVersion = '1.11.22' + byteBuddyVersion = '1.12.0' androidx_junit = '1.1.2' androidx_rules = '1.4.0-alpha04'