summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2021-04-16 15:30:58 +0800
committerRiddle Hsu <riddlehsu@google.com>2021-04-19 23:32:04 +0800
commitc5f95fb5a5fa348ae49afb0ca3d3620155a67678 (patch)
treeb6d65a41a7a4a2a12f6015a867686776828f6159 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentaa36363f72caf018595efa9d79c0c9b600fc012e (diff)
Update config from ancestor if it can handle orientation request
When calling Activity#setRequestedOrientation, the orientation of task may not be updated yet. If the requested orientation are mismatched, the configuration could be letterboxed (unresizable activity) according to the intermediate state. And because WindowProcessController may be a configuration listener of the activity, the app may receive unexpected configuration and keep calling setRequestedOrientation to cause a relaunch loop. Now the direct onConfigurationChanged from setOrientation is only called when: - In multi window mode: if the activity is unresizable, its requested orientation should be still respected to compute letterboxed bounds if needed. Otherwise the orientation is ignored for resizable. - The ancestor ignores orientation request from descendant, e.g. in a fixed orientation display. This should save an extra onConfigurationChanged for the most common case in fullscreen windowing mode. Fixes: 169349616 Test: atest WindowContainerTests#testSetOrientation Change-Id: I49ba2003699422a491c1183b10a691e25867ffa7
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions