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

Commit 15a3380d authored by Sangkyu Lee's avatar Sangkyu Lee Committed by Sungmin Choi
Browse files

Fix unexpected rotation change when re-enabling auto-rotate



getProposedRotation() method returns old value when re-enabling
auto-rotate option. So you can see unexpected rotation change
with the following steps.

settings -> display -> enable auto-rotate
-> rotate device to landscape -> disable auto-rotate
-> rotate device to portrait -> enable auto-rotate

This patch makes mSensorEventListener reset before it is registered again.

Bug: 7964531

Change-Id: I6a8d287bbd9809ef31de67c54efb885e9a4fd76f
Signed-off-by: default avatarSangkyu Lee <sk82.lee@lge.com>
parent 9fae2ecc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ public abstract class WindowOrientationListener {
            if (LOG) {
                Log.d(TAG, "WindowOrientationListener enabled");
            }
            mSensorEventListener.reset();
            mSensorManager.registerListener(mSensorEventListener, mSensor, mRate);
            mEnabled = true;
        }