Refine logic about compat scale
1. Make mGlobalScale and mInvGlobalScale always up-to-date. It was only updated before layout previously. We won't do layout at the server side then. So we update the scale when the upstream factors change. 2. Because of 1., we can return WindowState#getCompatInsetsState from addWindow and don't need to obtain it from getLayoutHint. 3. The logic in getLayoutHint didn't consider the overrideScale. This CL fixes it, and moves the logic to the only caller. We don't need getLayoutHint anymore. Bug: 161810301 Test: Use the following commands to test apps: adb shell am compat enable DOWNSCALED $packageName adb shell am compat enable DOWNSCALE_70 $packageName Change-Id: I67430cc61a6c086a8f232c711f63256523c77bb4
Loading
Please register or sign in to comment