mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-26 00:06:02 +00:00
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:
1 parent
75a0230304
commit
c85b84a964
4 files changed
+100
-17
No files matched your search
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user