Handle the WatchRotation failed
WindowManagerService#WatchRotation throw the IllegalArgumentException
when trying to register the rotation event with invalid display.
There is a case in MultiDisplaySystemDecorationTests when the display
is invalid, but the RotationButtonController still tries to register
the rotation event. The symptom impact the WindowManager CTS to
execute tesing completely.
This CL do the basic protection first to make the WM CTS more smooth.
Bug: 153607881
Test: atest MultiDisplaySystemDecorationTests
Change-Id: Ie3c240c3bc270d1f145640ee420b33ce95902e5d
1 file changed