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

Commit d44266ce authored by Hiroshi Lockheimer's avatar Hiroshi Lockheimer Committed by Android Git Automerger
Browse files

am 01128df3: am ce22d608: Merge "allow all 4 orientations" into gingerbread

* commit '01128df3':
  allow all 4 orientations
parents 5d322c09 01128df3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ import android.view.animation.AnimationUtils;
import android.media.IAudioService;
import android.media.AudioManager;

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

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

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

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