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

Notify client to clear intermediate rotated adjustments

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 to always return rotation from
the adjustment.

This change notifies client to clear the rotated adjustments if the
the display won't be rotated by the next top activity before the
transition is done, so the app can get the correct rotation in time.
The transform will be cleared at the end of transition animation so
the closing animation won't jump cut with rotation change. E.g.
launch an activity in different orientation and press home or back
key before the launch animation is finished.

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

Bug: 161519202
Bug: 168263090
Bug: 177390830
Test: DisplayContentTests#testClearIntermediateFixedRotationAdjustments

Change-Id: Ica074604df3e74eabbdef931531abe51855103e5
Merged-In: Ica074604df3e74eabbdef931531abe51855103e5
parent 7e2d8b8b
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