summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2013-09-10 09:31:04 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-10 09:31:04 -0700
commit4669a5d2783efbd30a0fa32cf22185f61c3d1215 (patch)
treeee5179d3f0ccf399d0dd04ec6f3fc934d1ef18c1
parentbbfdb779d596ef75d6ad13ed8e85d9a3b9512a5f (diff)
parent8eb3ece8eeaea4dc06c5b3854d8fd9efea4ef5fc (diff)
downloadframeworks_base-4669a5d2783efbd30a0fa32cf22185f61c3d1215.zip
frameworks_base-4669a5d2783efbd30a0fa32cf22185f61c3d1215.tar.gz
frameworks_base-4669a5d2783efbd30a0fa32cf22185f61c3d1215.tar.bz2
am 8eb3ece8: am 1d2daa78: Merge "Remove FD optimization case for decodeStream" into klp-dev
* commit '8eb3ece8eeaea4dc06c5b3854d8fd9efea4ef5fc': Remove FD optimization case for decodeStream
-rw-r--r--graphics/java/android/graphics/BitmapFactory.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index 25e8567..41ec79a 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -570,24 +570,10 @@ public class BitmapFactory {
Trace.traceBegin(Trace.TRACE_TAG_GRAPHICS, "decodeBitmap");
try {
- boolean decodeGenericStream = true;
if (is instanceof AssetManager.AssetInputStream) {
final int asset = ((AssetManager.AssetInputStream) is).getAssetInt();
bm = nativeDecodeAsset(asset, outPadding, opts);
- // Do not follow the normal case.
- decodeGenericStream = false;
- } else if (is instanceof FileInputStream) {
- try {
- FileDescriptor fd = ((FileInputStream) is).getFD();
- // decodeFileDescriptor will take care of throwing the IAE and
- // calling setDensityFromOptions.
- return decodeFileDescriptor(fd, outPadding, opts);
- } catch (IOException e) {
- // Fall through to nativeDecodeStream.
- }
- }
-
- if (decodeGenericStream) {
+ } else {
byte [] tempStorage = null;
if (opts != null) tempStorage = opts.inTempStorage;
if (tempStorage == null) tempStorage = new byte[DECODE_BUFFER_SIZE];