Merge "Fix WindowContainerThumbnailTest" into rvc-dev am: efda8ff71a

Change-Id: Ida55202b3a10b63a6ce8dd87a6fc603e4925ddfa
This commit is contained in:
TreeHugger Robot
2020-04-13 19:48:42 +00:00
committed by Automerger Merge Worker

View File

@@ -18,6 +18,7 @@ package com.android.server.wm;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock; import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.when; import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
import static org.mockito.ArgumentMatchers.any;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
@@ -49,6 +50,7 @@ public class WindowContainerThumbnailTest extends WindowTestsBase {
GraphicBuffer.USAGE_SW_READ_RARELY | GraphicBuffer.USAGE_SW_WRITE_NEVER); GraphicBuffer.USAGE_SW_READ_RARELY | GraphicBuffer.USAGE_SW_WRITE_NEVER);
final ActivityRecord mockAr = mock(ActivityRecord.class); final ActivityRecord mockAr = mock(ActivityRecord.class);
when(mockAr.getPendingTransaction()).thenReturn(new StubTransaction()); when(mockAr.getPendingTransaction()).thenReturn(new StubTransaction());
when(mockAr.makeChildSurface(any())).thenReturn(new MockSurfaceControlBuilder());
when(mockAr.makeSurface()).thenReturn(new MockSurfaceControlBuilder()); when(mockAr.makeSurface()).thenReturn(new MockSurfaceControlBuilder());
return new WindowContainerThumbnail(new StubTransaction(), mockAr, return new WindowContainerThumbnail(new StubTransaction(), mockAr,
buffer, false, mock(Surface.class), mock(SurfaceAnimator.class)); buffer, false, mock(Surface.class), mock(SurfaceAnimator.class));