summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker
diff options
context:
space:
mode:
authorRahul Chaturvedi <rkc@google.com>2015-06-01 21:03:43 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-01 21:03:43 +0000
commit29ed6af7a94b94295891508d4d49c192e3c55736 (patch)
treef4c64ba53ba5db9f65bd1aa15ad0ee66f46b6305 /WallpaperPicker
parent9ad4e9916f4c0285045e05eb9dfc00cca4acf8cd (diff)
parente4ca4a9ca16d3007f44e3ef30dbeacd20815b402 (diff)
downloadandroid_packages_apps_Trebuchet-29ed6af7a94b94295891508d4d49c192e3c55736.tar.gz
android_packages_apps_Trebuchet-29ed6af7a94b94295891508d4d49c192e3c55736.tar.bz2
android_packages_apps_Trebuchet-29ed6af7a94b94295891508d4d49c192e3c55736.zip
am e4ca4a9c: Merge "Add the Allow Rotation setting to Launcher3." into ub-launcher3-burnaby
* commit 'e4ca4a9ca16d3007f44e3ef30dbeacd20815b402': Add the Allow Rotation setting to Launcher3.
Diffstat (limited to 'WallpaperPicker')
-rw-r--r--WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
index 3f90203ed..659c3062b 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -1132,6 +1132,11 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
@Override
public boolean enableRotation() {
- return Utilities.isRotationEnabled(getContext());
+ // Check if rotation is enabled for this device.
+ if (Utilities.isRotationAllowedForDevice(getContext()))
+ return true;
+
+ // Check if the user has specifically enabled rotation via preferences.
+ return Utilities.isAllowRotationPrefEnabled(getApplicationContext());
}
}