Skip to content
Commit c797e0c6 authored by Tiger Huang's avatar Tiger Huang
Browse files

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
parent e45f1e5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment