OSDN Git Service

Fix dropped rotation events when unlocking orientation
authorSteve Elliott <steell@google.com>
Fri, 17 May 2019 18:39:53 +0000 (14:39 -0400)
committerSteve Elliott <steell@google.com>
Sun, 19 May 2019 13:04:39 +0000 (09:04 -0400)
commite05817ff03b9274a52e6d1b54d18576badfb0355
tree07c4ddeb866b71ae30c6014fb0f1b16a40d07175
parentf4744c686f9cfec9d3ecd0f879ef87e0f8149e91
Fix dropped rotation events when unlocking orientation

When unlocking orientation on the same frame as a rotation takes place
(example: orientation is locked to landscape, but phone is physically
oriented to portrait), onConfigurationChange is not invoked, and so
Global Actions is positioned as if it were in the locked orientation,
even though it has been rotated.

We work around this by post()ing the rotation unlock, so that it
happens on the next frame, at which point onConfigurationChange is
correctly invoked and the layout is re-oriented properly.

Fixes: 132581161
Test: manual
Change-Id: I1c11844e24bea115f9f44560fef8db863d19d7af
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java