From 02186dce92f4c0947904cb0970aad5673b602afa Mon Sep 17 00:00:00 2001 From: Acid Date: Wed, 11 Nov 2026 03:49:41 -0500 Subject: [PATCH 1/2] more tests fixes --- .../java/com/vivenotes/ViveNotesTestRunner.kt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/app/src/androidTest/java/com/vivenotes/ViveNotesTestRunner.kt b/app/src/androidTest/java/com/vivenotes/ViveNotesTestRunner.kt index 3146337..339c675 100644 --- a/app/src/androidTest/java/com/vivenotes/ViveNotesTestRunner.kt +++ b/app/src/androidTest/java/com/vivenotes/ViveNotesTestRunner.kt @@ -21,7 +21,8 @@ import androidx.test.runner.AndroidJUnitRunner * activity is destroyed, and no test typed anything to trigger it. Once the dialog is up, every * test after it is paused under it: "No compose hierarchies found", and screenshots that * capture the dialog instead of the page. [finish] puts the service back. A run killed before - * `finish` leaves autofill off, so the original service is logged under [TAG] to restore by hand. + * `finish` (an emulator crash, Ctrl-C) leaves autofill off. The service is also written to the + * global setting [PAUSED_MARKER], and the next run restores that value rather than the null it finds. */ class ViveNotesTestRunner : AndroidJUnitRunner() { @@ -54,9 +55,11 @@ class ViveNotesTestRunner : AndroidJUnitRunner() { } private fun pauseAutofill() { - val service = shell("settings get secure $AUTOFILL_SERVICE").trim() - if (service.isEmpty() || service == "null") return + // A marker means an earlier run was killed mid-pause: the null it left is not the + // device's own choice. + val service = setting("global", PAUSED_MARKER) ?: setting("secure", AUTOFILL_SERVICE) ?: return Log.i(TAG, "pausing autofill service $service for the run") + shell("settings put global $PAUSED_MARKER $service") shell("settings delete secure $AUTOFILL_SERVICE") pausedAutofillService = service } @@ -65,9 +68,14 @@ class ViveNotesTestRunner : AndroidJUnitRunner() { val service = pausedAutofillService ?: return pausedAutofillService = null shell("settings put secure $AUTOFILL_SERVICE $service") + shell("settings delete global $PAUSED_MARKER") Log.i(TAG, "restored autofill service $service") } + /** The setting's value, or null when it is unset; `settings get` prints "null" for that. */ + private fun setting(table: String, key: String): String? = + shell("settings get $table $key").trim().takeUnless { it.isEmpty() || it == "null" } + /** * Runs [command] as the shell user, which may write secure settings, and waits for its output. * The flag keeps the device's accessibility services on, as the default connection would @@ -85,6 +93,9 @@ class ViveNotesTestRunner : AndroidJUnitRunner() { /** `Settings.Secure.AUTOFILL_SERVICE`, which the SDK hides. */ const val AUTOFILL_SERVICE = "autofill_service" + /** Holds the paused service until [finish] restores it. */ + const val PAUSED_MARKER = "vivenotes_paused_autofill_service" + /** Well above the current ~20-minute suite, but still bounded if the runner hangs. */ const val MAX_SUITE_DURATION_MS = 60L * 60L * 1000L } From c108dcfa0ca6a4296739fc4223969ffc1af271dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2026 08:53:27 +0000 Subject: [PATCH 2/2] Bump material3 from 1.5.0-alpha25 to 1.5.0-rc01 Bumps `material3` from 1.5.0-alpha25 to 1.5.0-rc01. Updates `androidx.compose.material3:material3` from 1.5.0-alpha25 to 1.5.0-rc01 Updates `androidx.compose.material3:material3-window-size-class` from 1.5.0-alpha25 to 1.5.0-rc01 --- updated-dependencies: - dependency-name: androidx.compose.material3:material3 dependency-version: 1.5.0-rc01 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: androidx.compose.material3:material3-window-size-class dependency-version: 1.5.0-rc01 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4e0720e..d3d9621 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,7 +14,7 @@ activityCompose = "1.10.1" browser = "1.10.0" composeBom = "2026.09.00" -material3 = "1.5.0-alpha25" +material3 = "1.5.0-rc01" composeCore = "1.12.0-rc01" coreKtx = "1.19.1" credentials = "1.6.0"