summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/LauncherApplication.java
diff options
context:
space:
mode:
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 94163acc6..9b2458758 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -19,6 +19,7 @@ package com.android.launcher2;
import android.app.Application;
import android.app.SearchManager;
import android.content.ContentResolver;
+import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
@@ -116,6 +117,11 @@ public class LauncherApplication extends Application {
return sIsScreenLarge;
}
+ public static boolean isScreenLandscape(Context context) {
+ return context.getResources().getConfiguration().orientation ==
+ Configuration.ORIENTATION_LANDSCAPE;
+ }
+
public static float getScreenDensity() {
return sScreenDensity;
}