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

Commit 1d8d0159 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

allow all 4 orientations

Change-Id: Ia01b234d7d4e55cd4d8776e2a003ecf0cbd7d06f
parent 17c87d80
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -111,6 +111,7 @@ import android.view.animation.AnimationUtils;
import android.media.IAudioService;
import android.media.IAudioService;
import android.media.AudioManager;
import android.media.AudioManager;


import java.io.File;
import java.util.ArrayList;
import java.util.ArrayList;


/**
/**
@@ -2114,8 +2115,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    return getCurrentPortraitRotation(lastRotation);
                    return getCurrentPortraitRotation(lastRotation);
            }
            }


            if (new File("/system/etc/allow_all_orientations").exists()) {
                mOrientationListener.setAllow180Rotation(true);
            } else {
                mOrientationListener.setAllow180Rotation(
                mOrientationListener.setAllow180Rotation(
                        orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
                        orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
            }


            // case for nosensor meaning ignore sensor and consider only lid
            // case for nosensor meaning ignore sensor and consider only lid
            // or orientation sensor disabled
            // or orientation sensor disabled