summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Util.java
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2010-02-11 14:05:50 -0800
committerChih-Chung Chang <chihchung@google.com>2010-02-12 09:20:46 -0800
commitffbbd7f09b8832ce523799eec53753cd3559e53d (patch)
tree06a4e1c2a6e83cb7d4f3b85206b3086b056334c2 /src/com/android/camera/Util.java
parente3172febb111f286a37b685938dd930856540d77 (diff)
downloadLegacyCamera-ffbbd7f09b8832ce523799eec53753cd3559e53d.zip
LegacyCamera-ffbbd7f09b8832ce523799eec53753cd3559e53d.tar.gz
LegacyCamera-ffbbd7f09b8832ce523799eec53753cd3559e53d.tar.bz2
Remove the use of native allocation.
Diffstat (limited to 'src/com/android/camera/Util.java')
-rw-r--r--src/com/android/camera/Util.java23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java
index 362914a..df014cd 100644
--- a/src/com/android/camera/Util.java
+++ b/src/com/android/camera/Util.java
@@ -171,16 +171,12 @@ public class Util {
* @param uri
*/
public static Bitmap makeBitmap(int minSideLength, int maxNumOfPixels,
- Uri uri, ContentResolver cr, boolean useNative) {
+ Uri uri, ContentResolver cr) {
ParcelFileDescriptor input = null;
try {
input = cr.openFileDescriptor(uri, "r");
- BitmapFactory.Options options = null;
- if (useNative) {
- options = createNativeAllocOptions();
- }
return makeBitmap(minSideLength, maxNumOfPixels, uri, cr, input,
- options);
+ null);
} catch (IOException ex) {
return null;
} finally {
@@ -189,13 +185,9 @@ public class Util {
}
public static Bitmap makeBitmap(int minSideLength, int maxNumOfPixels,
- ParcelFileDescriptor pfd, boolean useNative) {
- BitmapFactory.Options options = null;
- if (useNative) {
- options = createNativeAllocOptions();
- }
+ ParcelFileDescriptor pfd) {
return makeBitmap(minSideLength, maxNumOfPixels, null, null, pfd,
- options);
+ null);
}
public static Bitmap makeBitmap(int minSideLength, int maxNumOfPixels,
@@ -281,13 +273,6 @@ public class Util {
return intent;
}
- // Returns Options that set the puregeable flag for Bitmap decode.
- public static BitmapFactory.Options createNativeAllocOptions() {
- BitmapFactory.Options options = new BitmapFactory.Options();
- options.inNativeAlloc = true;
- return options;
- }
-
public static void showFatalErrorAndFinish(
final Activity activity, String title, String message) {
DialogInterface.OnClickListener buttonListener =