diff options
author | Winson Chung <winsonc@google.com> | 2014-02-05 13:59:48 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-05 13:59:48 -0800 |
commit | cb2de6f8a027f43bf40f3f05664bc99bd78b2b00 (patch) | |
tree | 38bf61ba17a4c2ef88812b8587b6aa9cf22bc768 /src/com/android/launcher3 | |
parent | 22dc65e741139936343bc792900b2e2e25378793 (diff) | |
parent | 6033ceb438d2d8e6c8406e2b61ae515e6156965c (diff) | |
download | android_packages_apps_Trebuchet-cb2de6f8a027f43bf40f3f05664bc99bd78b2b00.tar.gz android_packages_apps_Trebuchet-cb2de6f8a027f43bf40f3f05664bc99bd78b2b00.tar.bz2 android_packages_apps_Trebuchet-cb2de6f8a027f43bf40f3f05664bc99bd78b2b00.zip |
am 6033ceb4: Ensure we don\'t call getLayoutDirection() for devices not running JB MR1+. (Bug 12906355)
* commit '6033ceb438d2d8e6c8406e2b61ae515e6156965c':
Ensure we don't call getLayoutDirection() for devices not running JB MR1+. (Bug 12906355)
Diffstat (limited to 'src/com/android/launcher3')
-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; |