Skip to content
Commit c6467172 authored by Ivan Podogov's avatar Ivan Podogov
Browse files

Fix setRequestedOrientation() freeze on Android Wear.

In ag/1460784 and ag/1551198, logic of
ActivityManagerService.updateConfigurationLocked
(now updateDisplayOverrideConfigurationLocked) was changed a bit:
before those CL's, with (changes == 0) we were still calling
mWindowManager.setNewConfiguration(mGlobalConfiguration)
(which is now mWindowManager.setNewDisplayOverrideConfiguration).
Now, when there was a call to Activity.setRequestedOrientation, the
window becomes frozen and waiting for configuration, which is never sent
since there are no changes detected (which we don't know in advance when
freezing the window). This is important for watches, since they have
"square" screens, and resources configuration for them doesn't change
after requesting landscape orientation, i.e. display rotates 90 degrees,
yet the layout stays portrait. As a result, device becomes frozen.

This CL only moves mWindowManager.setNewDisplayOverrideConfiguration
call outside of the (changes == 0) check to restore the old logic.

Bug: 37684680
Test: go/wm-smoke (on Pixel), manual (on Wear)
Change-Id: Idf1f5989173494d51437b9a66296b4cac82d15c2
parent 614636e9
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