summaryrefslogtreecommitdiffstats
path: root/core/jni/android
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2014-10-22 02:00:46 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-22 02:00:46 +0000
commit754bffe9692f2f62c4788b78eedbd63394db15a2 (patch)
tree09513baf4c77f10de56a0f8377541ac0c89ae352 /core/jni/android
parentde7df08cdad2094ffaaa02c047acd76c05a2f224 (diff)
parente463bc388e7f5d83f864b320dde400e390ef5817 (diff)
downloadframeworks_base-754bffe9692f2f62c4788b78eedbd63394db15a2.zip
frameworks_base-754bffe9692f2f62c4788b78eedbd63394db15a2.tar.gz
frameworks_base-754bffe9692f2f62c4788b78eedbd63394db15a2.tar.bz2
am e463bc38: am 3c8bde55: Merge "Report that a JavaInputStreamAdaptor is at end." into lmp-dev
* commit 'e463bc388e7f5d83f864b320dde400e390ef5817': Report that a JavaInputStreamAdaptor is at end.
Diffstat (limited to 'core/jni/android')
-rw-r--r--core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
index b64ab0d..a67740c 100644
--- a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
+++ b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
@@ -78,6 +78,8 @@ private:
env->ExceptionDescribe();
env->ExceptionClear();
SkDebugf("---- read threw an exception\n");
+ // Consider the stream to be at the end, since there was an error.
+ fIsAtEnd = true;
return 0;
}
@@ -92,6 +94,9 @@ private:
env->ExceptionDescribe();
env->ExceptionClear();
SkDebugf("---- read:GetByteArrayRegion threw an exception\n");
+ // The error was not with the stream itself, but consider it to be at the
+ // end, since we do not have a way to recover.
+ fIsAtEnd = true;
return 0;
}