summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/LauncherApplication.java
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-05-12 14:57:05 -0700
committerMichael Jurka <mikejurka@google.com>2011-05-12 15:07:49 -0700
commita2eb17095dcffa75c1e9681fdc318fe6e0564321 (patch)
tree537fb76a51d7be08e730837ea581d9db40ac5ee9 /src/com/android/launcher2/LauncherApplication.java
parent70a10240a9136146f60f07ebfbda9ffd7c955ab3 (diff)
downloadandroid_packages_apps_Trebuchet-a2eb17095dcffa75c1e9681fdc318fe6e0564321.tar.gz
android_packages_apps_Trebuchet-a2eb17095dcffa75c1e9681fdc318fe6e0564321.tar.bz2
android_packages_apps_Trebuchet-a2eb17095dcffa75c1e9681fdc318fe6e0564321.zip
Moving tablet interface to 'large' devices
(later, we will decide this more accurately based on the width of the screen in dips, but for now keeping changes so that they can easily be backported to earlier versions of Android) Change-Id: I203addcbf19e8e3813c488af47e4fdf90dcd3115
Diffstat (limited to 'src/com/android/launcher2/LauncherApplication.java')
-rw-r--r--src/com/android/launcher2/LauncherApplication.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java
index 041392c68..67573e083 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -27,7 +27,7 @@ import android.os.Handler;
public class LauncherApplication extends Application {
public LauncherModel mModel;
public IconCache mIconCache;
- private static boolean sIsScreenXLarge;
+ private static boolean sIsScreenLarge;
private static float sScreenDensity;
private static final boolean ENABLE_ROTATION = false;
@@ -36,7 +36,9 @@ public class LauncherApplication extends Application {
super.onCreate();
// set sIsScreenXLarge and sScreenDensity *before* creating icon cache
- sIsScreenXLarge = (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE;
+ final int screenSize = getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
+ sIsScreenLarge = screenSize == Configuration.SCREENLAYOUT_SIZE_LARGE ||
+ screenSize == Configuration.SCREENLAYOUT_SIZE_XLARGE;
sScreenDensity = getResources().getDisplayMetrics().density;
mIconCache = new IconCache(this);
@@ -97,11 +99,11 @@ public class LauncherApplication extends Application {
}
public static boolean isInPlaceRotationEnabled() {
- return sIsScreenXLarge && ENABLE_ROTATION;
+ return sIsScreenLarge && ENABLE_ROTATION;
}
- public static boolean isScreenXLarge() {
- return sIsScreenXLarge;
+ public static boolean isScreenLarge() {
+ return sIsScreenLarge;
}
public static float getScreenDensity() {