summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-03-21 16:20:24 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-21 16:20:24 +0000
commit00a44cbb2e871e6c694272c1d7ee5e90334e177a (patch)
tree375b939416e5161e46cba58246bf4d8d4827dbd8 /WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
parenta992aa0e9254bfd21e272e7e999c35119950fcfd (diff)
parent5319b2bb3ba25fa658f58c18130c91d9efb1f677 (diff)
downloadandroid_packages_apps_Trebuchet-00a44cbb2e871e6c694272c1d7ee5e90334e177a.tar.gz
android_packages_apps_Trebuchet-00a44cbb2e871e6c694272c1d7ee5e90334e177a.tar.bz2
android_packages_apps_Trebuchet-00a44cbb2e871e6c694272c1d7ee5e90334e177a.zip
am 5319b2bb: Merge "Removing all dependencies of launcher code on wallpaper-picker" into ub-launcher3-burnaby
* commit '5319b2bb3ba25fa658f58c18130c91d9efb1f677': Removing all dependencies of launcher code on wallpaper-picker
Diffstat (limited to 'WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java')
-rw-r--r--WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
index 1364df3ed..152cac4cc 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -71,6 +71,7 @@ import com.android.gallery3d.common.BitmapCropTask;
import com.android.gallery3d.common.BitmapUtils;
import com.android.gallery3d.common.Utils;
import com.android.launcher3.util.Thunk;
+import com.android.launcher3.util.WallpaperUtils;
import com.android.photos.BitmapRegionTileSource;
import com.android.photos.BitmapRegionTileSource.BitmapSource;
import com.android.photos.views.TiledImageRenderer.TileSource;
@@ -239,7 +240,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
@Override
public float getScale(TileSource src) {
- Point wallpaperSize = BitmapUtils.getDefaultWallpaperSize(
+ Point wallpaperSize = WallpaperUtils.getDefaultWallpaperSize(
a.getResources(), a.getWindowManager());
RectF crop = Utils.getMaxCropRect(
src.getImageWidth(), src.getImageHeight(),
@@ -1109,9 +1110,12 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
return view;
}
- // In Launcher3, we override this with a method that catches exceptions
- // from starting activities; didn't want to copy and paste code into here
public void startActivityForResultSafely(Intent intent, int requestCode) {
- startActivityForResult(intent, requestCode);
+ Utilities.startActivityForResultSafely(this, intent, requestCode);
+ }
+
+ @Override
+ public boolean enableRotation() {
+ return Utilities.isRotationEnabled(this);
}
}