Migrate WindowContext to WindowContextListener mechanism
1. Use registerWindowContextListener instead of
addWindowTokenWithOptions
2. Clean up the logic of sending the config to the client in WindowToken
3. Add a mechanism in WMS#addWindow, when a WindowContext adds a view,
the server side will switch to register the WindowToken for the
WindowContext.
In this way, we won't add a WindowToken until adding the fist view.
Also, we could apply an existing window token by overriding
WindowManager.LayoutParams.token.
Bug: 159767464
Bug: 153369119
Test: atest WindowContextTests WindowContextPolicyTests
Test: atest WindowContextTest
Test: atest WindowContextListenerControllerTests
Change-Id: I2396187c445306d18101706c4521edd9cf92facf
5 files changed