From e2dc5984ea507d5aa92e2fb41e6110eabd9ca917 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sun, 27 Sep 2026 17:33:11 +0800 Subject: [PATCH] Allow 30 seconds for app migration in tests The hidden app compiles its dynamic APK on first launch. On API 24 this pushes package removal past the 20-second receiver timeout. Wait up to 30 seconds while still requiring the removal broadcast. Assisted-by: GPT-6 --- .../main/java/com/topjohnwu/magisk/test/AppMigrationTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/src/main/java/com/topjohnwu/magisk/test/AppMigrationTest.kt b/app/test/src/main/java/com/topjohnwu/magisk/test/AppMigrationTest.kt index 7123d47eb..2e1cdc637 100644 --- a/app/test/src/main/java/com/topjohnwu/magisk/test/AppMigrationTest.kt +++ b/app/test/src/main/java/com/topjohnwu/magisk/test/AppMigrationTest.kt @@ -22,7 +22,8 @@ class AppMigrationTest { companion object { private const val APP_PKG = "com.topjohnwu.magisk" private const val STUB_PKG = "repackaged.$APP_PKG" - private const val RECEIVER_TIMEOUT = 20L + // First launch may compile the hidden app's dynamic APK before uninstalling. + private const val RECEIVER_TIMEOUT = 30L } private val instrumentation get() = InstrumentationRegistry.getInstrumentation()