From e51675b2860d1353b248f81fa78ac758e1bd5141 Mon Sep 17 00:00:00 2001 From: Juicestus Date: Sun, 19 Jan 2025 19:44:31 -0600 Subject: [PATCH] Update get_top_activity_name to be like latest droidbot --- droidbot/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/droidbot/device.py b/droidbot/device.py index a50f982..5fa5cc2 100644 --- a/droidbot/device.py +++ b/droidbot/device.py @@ -504,7 +504,7 @@ def get_top_activity_name(self): Get current activity """ r = self.adb.shell("dumpsys activity activities") - activity_line_re = re.compile('\* Hist #\d+: ActivityRecord{[^ ]+ [^ ]+ ([^ ]+) t(\d+)}') + activity_line_re = re.compile(r'\*\s*Hist\s*#\d+:\s*ActivityRecord\{[^ ]+\s*[^ ]+\s*([^ ]+)\s*t(\d+)}') m = activity_line_re.search(r) if m: return m.group(1)