diff options
author | Leon Scroggins III <scroggo@google.com> | 2014-10-21 13:56:42 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-21 13:56:42 +0000 |
commit | e463bc388e7f5d83f864b320dde400e390ef5817 (patch) | |
tree | cff0076c174a16792aec1d99f34a4a40ace85029 /core/jni/android | |
parent | fc56790085463ab410a5f407a4930b42509ad5f7 (diff) | |
parent | 3c8bde5534d81518f5baf3795989f367373f7dfd (diff) | |
download | frameworks_base-e463bc388e7f5d83f864b320dde400e390ef5817.zip frameworks_base-e463bc388e7f5d83f864b320dde400e390ef5817.tar.gz frameworks_base-e463bc388e7f5d83f864b320dde400e390ef5817.tar.bz2 |
am 3c8bde55: Merge "Report that a JavaInputStreamAdaptor is at end." into lmp-dev
* commit '3c8bde5534d81518f5baf3795989f367373f7dfd':
Report that a JavaInputStreamAdaptor is at end.
Diffstat (limited to 'core/jni/android')
-rw-r--r-- | core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp | 5 |
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; } |