Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

Use isolated display context to get display info

While display is in landscape, and the launcher is transformed to
portrait, the display rotation from activity or application context
will get the rotation in portrait.

In order to transform the input event when the orientations are
different, the actual device rotation is still needed. By creating
the display context from application context, the resources of
the new context won't be affected by the activity/application level
display info adjustments. That provides the actual device states.

Additionally, DefaultDisplay#INSTANCE should only be used for the
operations related to physical orientation/size because it won't
contain the override information from activity.

Bug: 157456493
Test: Use a device which may switch refresh rate.
      Open Maps and put device in landscape.
      Use gesture navigation to swipe up.
      The direction of movement should be consistent with UI.
Change-Id: I03108b1ab057e28727b6a6db3629d2c1c069e828
parent 9f3ae7b5
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