summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker/src/com/android/launcher3
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-05-18 16:40:56 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-05-18 16:42:22 -0700
commite49c105de57e53828ea372aff3713d6ebfd66f2e (patch)
treecc3ff79f5d7e6f7cec25003a62c227d8deeb9457 /WallpaperPicker/src/com/android/launcher3
parent2bba4c37c6402dfdc965d0c412c840c57993c7dd (diff)
downloadandroid_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')
-rw-r--r--WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java2
-rw-r--r--WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java10
2 files changed, 4 insertions, 8 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
index affad0f45..ee0d8b0c6 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
@@ -131,7 +131,7 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
// Load image in background
final BitmapRegionTileSource.UriBitmapSource bitmapSource =
- new BitmapRegionTileSource.UriBitmapSource(getContext(), imageUri, 1024);
+ new BitmapRegionTileSource.UriBitmapSource(getContext(), imageUri);
mSetWallpaperButton.setEnabled(false);
Runnable onLoad = new Runnable() {
public void run() {
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