Skip to content
Commit a83c85c8 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Clear fixed rotation for app no longer changes rotation

For example: launch a landscape activity while device is portrait,
and then launch another portrait activity before previous transition
is done. If the landscape activity is destroyed before sending the
fixed rotation adjustment for restoration, the adjustment is always
retained by client side app. That causes the Display objects
associated with application Resources always return rotation from
the adjustment.

This change clear the rotated state immediately when the top app
has changed to the one that won't rotate the display. So the previous
activity can receive the adjustment for restoration in time.

Also simply a bit for the path of clearing fixed rotation state to
avoid sending duplicated adjustments.

Bug: 177390830
Test: DisplayContentTests#testClearIntermediateFixedRotation

Change-Id: Ic13dff8b7a23a6022201a8fe7a981bb511b6e856
parent 1e465216
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