GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
472 stars 66 forks source link

PINEPHONE: Auto rotate inverted #30

Closed nas00 closed 4 years ago

nas00 commented 4 years ago

On the latest pinephone release, the screen auto rotates apps to the opposite direction of the physical orientation.

rsglobal commented 4 years ago

It seems that X and Y coordinates of accelerometer are swapped.

  1. https://developer.android.com/guide/topics/sensors/sensors_overview#sensors-coords
  2. http://josejuansanchez.org/android-sensors-overview/accelerometer/README.html
rsglobal commented 4 years ago

I've added correct mount matrix into pinephone.dtsi that fixed this issue for me.

        mount-matrix = "0", "-1", "0",
                   "1", "0", "0",
                   "0", "0", "1";
rsglobal commented 4 years ago

Change is available in the next integration build: https://github.com/GloDroid/glodroid_manifest/issues/58#issuecomment-670354906

rsglobal commented 4 years ago

IOS orientation: https://developer.apple.com/documentation/uikit/uiacceleration?language=objc