diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-07-12 17:23:39 -0700 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2013-07-15 10:02:43 -0700 |
commit | 0dca1b590f4cae2fe42afc9245f1a8ea81f9e6d3 (patch) | |
tree | f67b95279ee27db61031bd06e391cbc386015c5c /src/com/android/gallery3d/filtershow/crop/CropActivity.java | |
parent | 2212065e2de9ec6a2a105218a693a48145e9bfb6 (diff) | |
download | android_packages_apps_Snap-0dca1b590f4cae2fe42afc9245f1a8ea81f9e6d3.tar.gz android_packages_apps_Snap-0dca1b590f4cae2fe42afc9245f1a8ea81f9e6d3.tar.bz2 android_packages_apps_Snap-0dca1b590f4cae2fe42afc9245f1a8ea81f9e6d3.zip |
Combine ImageLoader and CropLoader utility classes.
Bug: 9356969
Bug: 9170644
- Refactor to eliminate code duplication in image loading classes.
- Fix bugs caused by the inability to determine MIME types for images
that aren't in Gallery's content provider (causes b/9356969).
Change-Id: I30c2ba5c0cd37aac624681a2cec9abddaa78f9c2
Diffstat (limited to 'src/com/android/gallery3d/filtershow/crop/CropActivity.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/crop/CropActivity.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/crop/CropActivity.java b/src/com/android/gallery3d/filtershow/crop/CropActivity.java index d349d5d67..d14c090fa 100644 --- a/src/com/android/gallery3d/filtershow/crop/CropActivity.java +++ b/src/com/android/gallery3d/filtershow/crop/CropActivity.java @@ -44,6 +44,8 @@ import android.widget.Toast; import com.android.gallery3d.R; import com.android.gallery3d.common.Utils; +import com.android.gallery3d.filtershow.cache.ImageLoader; +import com.android.gallery3d.filtershow.tools.SaveCopyTask; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -261,9 +263,9 @@ public class CropActivity extends Activity { @Override protected Bitmap doInBackground(Uri... params) { Uri uri = params[0]; - Bitmap bmap = CropLoader.getConstrainedBitmap(uri, mContext, mBitmapSize, + Bitmap bmap = ImageLoader.loadConstrainedBitmap(uri, mContext, mBitmapSize, mOriginalBounds); - mOrientation = CropLoader.getMetadataRotation(uri, mContext); + mOrientation = ImageLoader.getMetadataRotation(mContext, uri); return bmap; } @@ -297,7 +299,7 @@ public class CropActivity extends Activity { } } if (flags == 0) { - destinationUri = CropLoader.makeAndInsertUri(this, mSourceUri); + destinationUri = SaveCopyTask.makeAndInsertUri(this, mSourceUri); if (destinationUri != null) { flags |= DO_EXTRA_OUTPUT; } |