summaryrefslogtreecommitdiffstats
path: root/core/jni/android
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2014-10-21 13:52:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-21 13:52:30 +0000
commit3c8bde5534d81518f5baf3795989f367373f7dfd (patch)
treef9e9f828665dc01eeb96a3e490d601f05f676fba /core/jni/android
parente1c9489cc40542bfa2adbb84b6fb77cff4ab8570 (diff)
parent91332e7ecac06ef4cd3320095689e6af21e13dc6 (diff)
downloadframeworks_base-3c8bde5534d81518f5baf3795989f367373f7dfd.zip
frameworks_base-3c8bde5534d81518f5baf3795989f367373f7dfd.tar.gz
frameworks_base-3c8bde5534d81518f5baf3795989f367373f7dfd.tar.bz2
Merge "Report that a JavaInputStreamAdaptor is at end." into lmp-dev
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;
}