summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2012-04-24 14:24:35 -0700
committerAdam Cohen <adamcohen@google.com>2012-04-24 14:29:10 -0700
commitcb3f98e983cd7ac9f8cf57780632f82c35478efc (patch)
tree485307c849bb55a2c59cc409d6fe0a4aaffb88a9
parentc3a804042844dc4733b4bd4b6ac03bf4b2b015b7 (diff)
downloadandroid_packages_apps_Trebuchet-cb3f98e983cd7ac9f8cf57780632f82c35478efc.tar.gz
android_packages_apps_Trebuchet-cb3f98e983cd7ac9f8cf57780632f82c35478efc.tar.bz2
android_packages_apps_Trebuchet-cb3f98e983cd7ac9f8cf57780632f82c35478efc.zip
Enable rotation for sw600dp devices
Change-Id: Id01c84eba30a80cb21b1527cdc137aba9cda09f2
-rw-r--r--res/values-sw600dp/config.xml2
-rw-r--r--res/values/config.xml1
-rw-r--r--src/com/android/launcher2/Launcher.java4
3 files changed, 6 insertions, 1 deletions
diff --git a/res/values-sw600dp/config.xml b/res/values-sw600dp/config.xml
index a701e69d1..00b2e15fc 100644
--- a/res/values-sw600dp/config.xml
+++ b/res/values-sw600dp/config.xml
@@ -1,4 +1,6 @@
<resources>
+ <bool name="allow_rotation">true</bool>
+
<integer name="cell_count_x">6</integer>
<integer name="cell_count_y">6</integer>
<integer name="hotseat_cell_count">7</integer>
diff --git a/res/values/config.xml b/res/values/config.xml
index 2a75af846..18901255b 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -2,6 +2,7 @@
<bool name="config_hardwareAccelerated">true</bool>
<bool name="config_largeHeap">false</bool>
<bool name="is_large_screen">false</bool>
+ <bool name="allow_rotation">false</bool>
<!-- AllApps/Customize/AppsCustomize -->
<!-- The alpha of the AppsCustomize bg in spring loaded mode -->
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 5965b5cd4..71fd27856 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -380,8 +380,10 @@ public final class Launcher extends Activity
final String forceEnableRotation =
SystemProperties.get(FORCE_ENABLE_ROTATION_PROPERTY, "false");
+ boolean enableRotation = getResources().getBoolean(R.bool.allow_rotation);
+
// On large interfaces, we want the screen to auto-rotate based on the current orientation
- if (LauncherApplication.isScreenLarge() || "true".equalsIgnoreCase(forceEnableRotation)) {
+ if (enableRotation || "true".equalsIgnoreCase(forceEnableRotation)) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
}
}