From 83787a607c136dedabaadfa37482e4e53e631bc5 Mon Sep 17 00:00:00 2001 From: tobitege <10787084+tobitege@users.noreply.github.com> Date: Fri, 6 Nov 2026 21:34:46 +0100 Subject: [PATCH] Turn off the system's error dialogs in the Android check A slow emulator showed "Pixel Launcher isn't responding" over the Gallery and the dialog took the tap on a theme, so the check failed although the Gallery worked. The check now hides the error dialogs, also those of apps in the background, before it starts the Gallery. --- scripts/check_android_gallery.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/check_android_gallery.py b/scripts/check_android_gallery.py index 77f6281..85d6f21 100644 --- a/scripts/check_android_gallery.py +++ b/scripts/check_android_gallery.py @@ -147,6 +147,10 @@ def main(): print(adb("shell", "getprop", "ro.build.version.release").strip(), "/", adb("shell", "getprop", "ro.product.cpu.abi").strip(), "/", adb("shell", "wm", "size").strip(), flush=True) + # A slow emulator shows " isn't responding" dialogs, also for apps in the background such as the launcher, + # and such a dialog takes the next tap of the check. Without the dialogs the system closes such an app quietly. + adb("shell", "settings", "put", "global", "hide_error_dialogs", "1") + adb("shell", "settings", "put", "secure", "anr_show_background", "0") print(adb("install", "-r", str(apk), timeout=300).strip(), flush=True) adb("logcat", "-c") check = Check(output)