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

Commit e62001bb authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Clear invocation count before verifying mirroring method

The count may be increased in setUp from
applySurfaceChangesTransaction before mocking
performSurfacePlacement.

Fix: 295866207
Test: ContentRecorderTests# \
      testDisplayContentUpdatesRecording_displayMirroring
Change-Id: Ia4ae93c57dfce30ea09802d4be159f1c472d37d9
parent 83a2357e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.never;

import android.app.WindowConfiguration;
@@ -507,6 +508,7 @@ public class ContentRecorderTests extends WindowTestsBase {
        // Return the default display as the value to mirror to ensure the VD with flag mirroring
        // creates a ContentRecordingSession automatically.
        doReturn(DEFAULT_DISPLAY).when(mWm.mDisplayManagerInternal).getDisplayIdToMirror(anyInt());
        clearInvocations(virtualDisplay);
        virtualDisplay.updateRecording();

        // THEN mirroring is initiated for the default display's DisplayArea.