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

Commit b499bb10 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix NPE if there is no accelerometer.

Change-Id: I983290a7fc3deda2a82b03ff564f1b7201cc3dd3
parent 5a5fff71
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -109,8 +109,10 @@ public abstract class WindowOrientationListener {
    }

    public void setAllow180Rotation(boolean allowed) {
        if (mSensorEventListener != null) {
            mSensorEventListener.setAllow180Rotation(allowed);
        }
    }

    public int getCurrentRotation(int lastRotation) {
        if (mEnabled) {