summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/LauncherApplication.java
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2010-10-20 15:02:04 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-20 15:02:04 -0700
commitbae3d061cc16ad005302b5eec404c4c0bc3a7421 (patch)
treea6d5497a398d5cde09218fd4914fc039fb69d776 /src/com/android/launcher2/LauncherApplication.java
parentfd177c1d10085e5e12ff7df27d956a378d1139b1 (diff)
parent8e58e916061cbe2623697efac0924f2aa3753a92 (diff)
downloadandroid_packages_apps_Trebuchet-bae3d061cc16ad005302b5eec404c4c0bc3a7421.tar.gz
android_packages_apps_Trebuchet-bae3d061cc16ad005302b5eec404c4c0bc3a7421.tar.bz2
android_packages_apps_Trebuchet-bae3d061cc16ad005302b5eec404c4c0bc3a7421.zip
Merge "Various cleanups in the drag viz code."
Diffstat (limited to 'src/com/android/launcher2/LauncherApplication.java')
-rw-r--r--src/com/android/launcher2/LauncherApplication.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java
index ca08378d8..8a18317bc 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -29,6 +29,7 @@ public class LauncherApplication extends Application {
public LauncherModel mModel;
public IconCache mIconCache;
private static boolean sIsScreenXLarge;
+ private static float sScreenDensity;
private static final boolean ENABLE_ROTATION = false;
@Override
@@ -40,6 +41,7 @@ public class LauncherApplication extends Application {
mIconCache = new IconCache(this);
mModel = new LauncherModel(this, mIconCache);
sIsScreenXLarge = (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE;
+ sScreenDensity = getResources().getDisplayMetrics().density;
// Register intent receivers
IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
@@ -101,4 +103,8 @@ public class LauncherApplication extends Application {
public static boolean isScreenXLarge() {
return sIsScreenXLarge;
}
+
+ public static float getScreenDensity() {
+ return sScreenDensity;
+ }
}