Skip to content
Commit 164725c6 authored by riddle_hsu's avatar riddle_hsu
Browse files

Avoid configuration of callback being reset after relayout.

mPendingConfiguration is a parameter of IWindowSession.relayout.
And IWindowSession.aidl declared "out Configuration outConfig",
it will always create a new configuration for remote side to write.
If remote side does not write (WMS does not have config change),
the new default configuration will be returned.

In original code passes mPendingConfiguration to updateConfiguration
directly, then callbacks (sConfigCallbacks) receive the same
instance of mPendingConfiguration. And because the implementation
of callback may use the configuration after relayout has reset
the configuration to default, then it may have timing that results
"showing hybrid of portrait and landscape modes" which try to fix
in commit e36d6e27.

To avoid this, always create a copy to updateConfiguration.
MSG_RESIZED_REPORT from dispatchResized also did the same thing.

Related commit:
e36d6e27
694f79b5

Change-Id: Ic1abd596e384918224b3a7020583d9a04641cccc
parent 8d8515e7
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