fix(input): fakeinput no longer aborts programs whose allocator calls a hooked function at startup (#2361)

* fix(input): fakeinput no longer aborts programs whose allocator calls a hooked function at startup

* fix(ctl): screenshot finds display ids that the device name carries inline

* fix(input): fakeinput registers its fork handlers before other threads see its config
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-11-09 16:41:26 -05:00
1 parent 75a0230304
commit c85b84a964
4 files changed
+100 -17

No files matched your search

+9
View File
@@ -328,6 +328,15 @@ class DroiddeckctlTest(FakeAdbTest):
self.assertEqual("222", out["displays"][1]["physicalId"])
self.assertEqual([1080, 1240], out["displays"][1]["size"])
def test_displays_named_with_their_unique_id(self):
text = DUMPSYS_DISPLAY.replace("mPrimaryDisplayDevice=Screen-2",
"mPrimaryDisplayDevice=Screen-2(local:222)")
self.configure({}, dumpsys_display=text)
code, out = self.run_ctl("screenshot", str(self.dir / "shot.png"), "--display", "4")
self.assertEqual(0, code)
shot = [c for c in self.calls() if c["args"][:2] == ["exec-out", "screencap"]][0]
self.assertEqual(["exec-out", "screencap", "-p", "-d", "222"], shot["args"])
def test_unknown_display_is_an_error(self):
self.configure({}, dumpsys_display=DUMPSYS_DISPLAY)
code, out = self.run_ctl("screenshot", str(self.dir / "x.png"), "--display", "9")