diff options
author | Winson Chung <winsonc@google.com> | 2014-02-05 12:37:42 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2014-02-05 20:39:15 +0000 |
commit | 6033ceb438d2d8e6c8406e2b61ae515e6156965c (patch) | |
tree | 8e356188616464cb8230c1103721502e9f2714e2 /src/com/android | |
parent | f47cc890e9475b31acd1416de57d32062d395e9e (diff) | |
download | android_packages_apps_Trebuchet-6033ceb438d2d8e6c8406e2b61ae515e6156965c.tar.gz android_packages_apps_Trebuchet-6033ceb438d2d8e6c8406e2b61ae515e6156965c.tar.bz2 android_packages_apps_Trebuchet-6033ceb438d2d8e6c8406e2b61ae515e6156965c.zip |
Ensure we don't call getLayoutDirection() for devices not running JB MR1+. (Bug 12906355)
Change-Id: I25115b9529c21d3079f50bc26bad8f846a6fcd3e
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 7ca4f811c..e67ec197a 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -371,7 +371,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; |