Refresh layout parameter for bounds change from relayout
The relayout method also assumes the client can get the latest configuration. So if the client only relies on IWindow#resized to compute its layout parameter, there may be a race that resized gets config 1, and then even if relayout gets config 2, the window still uses old layout parameter. So this change simulates similar behavior as ViewRootImpl did: check the config changes both from resized and relayout. Also optimize a case if resized is called many times in a short time from server side, or the ui thread is not able to consume the events in time, then only the last event will be handled. So several relayout invocations for outdated intermediate states can be reduced. Bug: 264829202 Test: Hardcoded to return a wrong bound from IWindow#resized to wallpaper, wallpaper can still show correct size. Merged-In: I0b4a480c6e85133f2d0d30042603009cc94db9c0 Change-Id: If4299bc7bba022b12c33343ecc2a45050c159210
Loading
Please register or sign in to comment