Set return value for mock(IWindow).asBinder() to prevent exception
In TestWindowManagerPolicy#addSplashScreen(), mock(IWindow) is created and it's passed to the constructor of WindowState. In the constructor, c.asBinder().linkToDeath() is called, but currently, c.asBinder() returns null, which ends up throwing an exception. This CL sets a proper return value for c.asBinder(). With this CL, all the tests in AppWindowContainerControllerTests pass in ARC. Bug: 110906840 Test: atest AppWindowContainerControllerTests Change-Id: I5cacd6635eb11f174d14c7c2a3873dc648d43527
Loading
Please register or sign in to comment