diff options
author | Leon Scroggins III <scroggo@google.com> | 2014-10-22 05:55:29 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2014-10-22 05:55:29 +0000 |
commit | 9a23332716d0aad7d5f99f6c70c7298db96b7a83 (patch) | |
tree | 62929b406f3ee5f8ba76a62ed1b412f2a4a26fb2 | |
parent | af3668c31bfe0c1271f5f64f9ee39c48f06a1919 (diff) | |
parent | 85606df57518739ef26680ac821b6f1432791ce6 (diff) | |
download | frameworks_base-9a23332716d0aad7d5f99f6c70c7298db96b7a83.zip frameworks_base-9a23332716d0aad7d5f99f6c70c7298db96b7a83.tar.gz frameworks_base-9a23332716d0aad7d5f99f6c70c7298db96b7a83.tar.bz2 |
am 754bffe9: am e463bc38: am 3c8bde55: Merge "Report that a JavaInputStreamAdaptor is at end." into lmp-dev automerge: f408217
automerge: 85606df
* commit '85606df57518739ef26680ac821b6f1432791ce6':
Report that a JavaInputStreamAdaptor is at end.
-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; } |