Merge "Fix flaky WindowTokenClientControllerTest" into main
This commit is contained in:
@@ -73,6 +73,12 @@ public class WindowTokenClientController {
|
||||
}
|
||||
}
|
||||
|
||||
/** Creates a new instance for test only. */
|
||||
@VisibleForTesting
|
||||
public static WindowTokenClientController createInstanceForTesting() {
|
||||
return new WindowTokenClientController();
|
||||
}
|
||||
|
||||
private WindowTokenClientController() {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,7 +76,7 @@ public class WindowTokenClientControllerTest {
|
||||
mOriginalWindowManagerService = WindowManagerGlobal.getWindowManagerService();
|
||||
WindowManagerGlobal.overrideWindowManagerServiceForTesting(mWindowManagerService);
|
||||
doReturn(mClientToken).when(mWindowTokenClient).asBinder();
|
||||
mController = spy(WindowTokenClientController.getInstance());
|
||||
mController = spy(WindowTokenClientController.createInstanceForTesting());
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user