Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04bd2b5e authored by Chun-Ku Lin's avatar Chun-Ku Lin
Browse files

Use INVALID_DISPLAY as the display id to test InvalidDisplay scenario

**Root cause**
When the test is executing on a foldable device, there are two displays.
Use DEFAULT_DISPLAY + 1 is less reliable then use INVALID_DISPLAY.

Bug: 432243847
Test: atest AbstractAccessibilityServiceConnectionTest
Flag: EXEMPT test only
Change-Id: I7b350f68dc7933b49d914051ab18e9501127509d
parent a8182cb6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -770,7 +770,7 @@ public class AbstractAccessibilityServiceConnectionTest {
        final DisplayManager displayManager = new DisplayManager(mMockContext);
        when(mMockContext.getSystemService(Context.DISPLAY_SERVICE)).thenReturn(displayManager);

        mServiceConnection.takeScreenshot(Display.DEFAULT_DISPLAY + 1,
        mServiceConnection.takeScreenshot(Display.INVALID_DISPLAY,
                new RemoteCallback(mMockListener));
        mHandler.sendLastMessage();