Merge "allow all 4 orientations" into gingerbread
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 43936a4..a277bcb 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.media.IAudioService;
import android.media.AudioManager;
+import java.io.File;
import java.util.ArrayList;
/**
@@ -2114,8 +2115,12 @@
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