From 1d8d0159e72556ea20aba325fb27d8470282e1ba Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 4 Nov 2010 18:39:10 -0700 Subject: [PATCH] allow all 4 orientations Change-Id: Ia01b234d7d4e55cd4d8776e2a003ecf0cbd7d06f --- .../android/internal/policy/impl/PhoneWindowManager.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 43936a4e876a3..a277bcb012b05 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -111,6 +111,7 @@ import android.view.animation.AnimationUtils; import android.media.IAudioService; import android.media.AudioManager; +import java.io.File; import java.util.ArrayList; /** @@ -2114,8 +2115,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { return getCurrentPortraitRotation(lastRotation); } - mOrientationListener.setAllow180Rotation( - orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR); + 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