diff options
| author | 2023-12-12 22:02:59 -0600 | |
|---|---|---|
| committer | 2023-12-15 21:45:39 +0800 | |
| commit | a10d9b94c15302d4ff0a472a1391fd8c0fcf822b (patch) | |
| tree | d7c13ab4f71beb2160fba575cad95625a2bd203d /libs/androidfw/FileStream.cpp | |
| parent | c7faccbdbdae750779b2cf5bc70de3c8a95e2a94 (diff) | |
Simplify legacy screen compat mode a bit
The entry of changing legacy screen compat mode is almost a dead code.
The current usage is only from command:
adb shell am screen-compat [on|off] $packageName
But because the manifest attributes are still valid:
android:smallScreens/normalScreens/largeScreens
It might be better to preserve the behavior for now.
By caching the legacy compat state in server side and reusing
restartProcessIfVisible for compatibility info change, this can
reduce unnecessary Configuration comparison on every frame from
Display#getDisplayAdjustments(). Also the fields can be removed:
ViewRootImpl#mLastInCompatMode
WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW
ActivityRecord#forceNewConfig
Bug: 163976519
Test: atest CompatModePackagesTests
Test: adb install --bypass-low-target-sdk-block test.apk
which declares minSdkVersion="1"
The appearance is not changed and touch can still work.
Test: App (without always/never-compat) can be relaunched and
scaled when using command:
adb shell am screen-compat [on|off] $packageName
Change-Id: I661ddaee15014201aa1109671cfd6619df91ea4a
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions