Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0530caa authored by Riddle Hsu's avatar Riddle Hsu Committed by Xiang Wang
Browse files

Apply override scale from entry points on client

This provides a sandbox-like scaled environment on client side.

- This prevents the metrics and config from being scaled multiple
  times because the entry points are only called from server side,
  there won't have reentrancy for applying the scale.
- App's configuration callback method can get scaled config.
- If override scale is enabled, the legacy compat mode will be
  skipped. That avoids mixing different approaches of scaling.
  - Legacy compat mode is to simulate a 320dp x 480dp screen
    size with density 160 (the surface scale and config scale
    are different).
  - Override scale is to downscale the app for better performance
    (the surface scale and config scale are the same).

Bug: 238416387
Bug: 240335717
Test: atest ActivityThreadTest#testOverrideScale
Test: atest CtsWindowManagerDeviceTestCases:CompatScaleTests
Test: am compat enable DOWNSCALED $pkg
      am compat enable DOWNSCALE_50 $pkg
Change-Id: I0ddf333996f229063511273f8aeb3867c9ba8bda
parent 56fe9580
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment