From 5319a9cb34fe5521de75143723d8fda2b67dbf8a Mon Sep 17 00:00:00 2001 From: chenhq Date: Wed, 15 Mar 2023 15:44:56 +0800 Subject: [PATCH] fix #116 --- solox/public/fps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/solox/public/fps.py b/solox/public/fps.py index 84bd4ef..715c665 100644 --- a/solox/public/fps.py +++ b/solox/public/fps.py @@ -399,9 +399,12 @@ def _get_surfaceflinger_frame_data(self): return (None, None) isHaveFoundWindow = False PROFILEDATA_line = 0 + activity = self.focus_window() + if activity.__contains__('#'): + activity = activity.split('#')[0] for line in results: if not isHaveFoundWindow: - if "Window" in line or self.focus_window.split('#')[0] in line: + if "Window" in line and activity in line: isHaveFoundWindow = True if not isHaveFoundWindow: continue