summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-02-05 12:37:42 -0800
committerDanesh M <daneshm90@gmail.com>2014-06-06 22:54:28 -0700
commitdfdec456504431259e77e75339bded5c77f2e998 (patch)
tree8fe1854b7bc5c13b254c0a7385d8b172e5a095f1
parent8fd6faf922af66a78e57357b70b7ed57b59f606d (diff)
downloadandroid_packages_apps_Trebuchet-dfdec456504431259e77e75339bded5c77f2e998.tar.gz
android_packages_apps_Trebuchet-dfdec456504431259e77e75339bded5c77f2e998.tar.bz2
android_packages_apps_Trebuchet-dfdec456504431259e77e75339bded5c77f2e998.zip
Ensure we don't call getLayoutDirection() for devices not running JB MR1+. (Bug 12906355)
Change-Id: I25115b9529c21d3079f50bc26bad8f846a6fcd3e
-rw-r--r--src/com/android/launcher3/DeviceProfile.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 79fbbb66b..1a0f4c2a4 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -388,7 +388,11 @@ public class DeviceProfile {
isLandscape = (configuration.orientation == Configuration.ORIENTATION_LANDSCAPE);
isTablet = resources.getBoolean(R.bool.is_tablet);
isLargeTablet = resources.getBoolean(R.bool.is_large_tablet);
- isLayoutRtl = (configuration.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL);
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
+ isLayoutRtl = (configuration.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL);
+ } else {
+ isLayoutRtl = false;
+ }
widthPx = wPx;
heightPx = hPx;
availableWidthPx = awPx;