diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-05-18 16:40:56 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-05-18 16:42:22 -0700 |
commit | e49c105de57e53828ea372aff3713d6ebfd66f2e (patch) | |
tree | cc3ff79f5d7e6f7cec25003a62c227d8deeb9457 /WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java | |
parent | 2bba4c37c6402dfdc965d0c412c840c57993c7dd (diff) | |
download | android_packages_apps_Trebuchet-e49c105de57e53828ea372aff3713d6ebfd66f2e.tar.gz android_packages_apps_Trebuchet-e49c105de57e53828ea372aff3713d6ebfd66f2e.tar.bz2 android_packages_apps_Trebuchet-e49c105de57e53828ea372aff3713d6ebfd66f2e.zip |
Verify that an image can be rendered on a GL Surface before using it
Bug: 20138883
Change-Id: I8de70eb971f31c2a4c07a7903e097a1586402282
Diffstat (limited to 'WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java')
-rw-r--r-- | WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java index 1ba5b4b2e..72cb194d6 100644 --- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java @@ -21,7 +21,6 @@ import android.annotation.TargetApi; import android.app.ActionBar; import android.app.Activity; import android.app.WallpaperManager; -import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; @@ -144,8 +143,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { public void onClick(final WallpaperPickerActivity a) { a.setWallpaperButtonEnabled(false); final BitmapRegionTileSource.UriBitmapSource bitmapSource = - new BitmapRegionTileSource.UriBitmapSource( - a.getContext(), mUri, BitmapRegionTileSource.MAX_PREVIEW_SIZE); + new BitmapRegionTileSource.UriBitmapSource(a.getContext(), mUri); a.setCropViewTileSource(bitmapSource, true, false, null, new Runnable() { @Override @@ -199,8 +197,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { public void onClick(final WallpaperPickerActivity a) { a.setWallpaperButtonEnabled(false); BitmapRegionTileSource.UriBitmapSource bitmapSource = - new BitmapRegionTileSource.UriBitmapSource(a.getContext(), - Uri.fromFile(mFile), 1024); + new BitmapRegionTileSource.UriBitmapSource(a.getContext(), Uri.fromFile(mFile)); a.setCropViewTileSource(bitmapSource, false, true, null, new Runnable() { @Override @@ -236,8 +233,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { public void onClick(final WallpaperPickerActivity a) { a.setWallpaperButtonEnabled(false); BitmapRegionTileSource.ResourceBitmapSource bitmapSource = - new BitmapRegionTileSource.ResourceBitmapSource( - mResources, mResId, BitmapRegionTileSource.MAX_PREVIEW_SIZE); + new BitmapRegionTileSource.ResourceBitmapSource(mResources, mResId); a.setCropViewTileSource(bitmapSource, false, false, new CropViewScaleProvider() { @Override |