summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware
diff options
context:
space:
mode:
authorChien-Yu Chen <cychen@google.com>2015-07-06 17:46:05 -0700
committerChien-Yu Chen <cychen@google.com>2015-07-06 18:26:28 -0700
commite0ee63046ad062040aafc977585fb461a2acf666 (patch)
treeba229ef179ac0b33398bccd914305d212e206209 /core/java/android/hardware
parent13c25290099a570fdd903511e7ec605119af3ce3 (diff)
downloadframeworks_base-e0ee63046ad062040aafc977585fb461a2acf666.zip
frameworks_base-e0ee63046ad062040aafc977585fb461a2acf666.tar.gz
frameworks_base-e0ee63046ad062040aafc977585fb461a2acf666.tar.bz2
ImageWriter: Exception when Surface is abandoned
Throw IllegalStateException when queueing or dequeueing an image if the input surface is already abandoned by the consumer. Also fix a crash when planes are not initialized when closing ImageWriter. Bug: 22279111 Change-Id: I8301920d64a53c45b29e947e52ff323733abbf16
Diffstat (limited to 'core/java/android/hardware')
-rw-r--r--core/java/android/hardware/camera2/CameraCaptureSession.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java
index c547b06..62ebfb3 100644
--- a/core/java/android/hardware/camera2/CameraCaptureSession.java
+++ b/core/java/android/hardware/camera2/CameraCaptureSession.java
@@ -497,8 +497,9 @@ public abstract class CameraCaptureSession implements AutoCloseable {
*
* <p>Each reprocessable capture session has an input {@link Surface} where the reprocess
* capture requests get the input images from, rather than the camera device. The application
- * can create a {@link android.media.ImageWriter} with this input {@link Surface} and use it to
- * provide input images for reprocess capture requests.</p>
+ * can create a {@link android.media.ImageWriter ImageWriter} with this input {@link Surface}
+ * and use it to provide input images for reprocess capture requests. When the reprocessable
+ * capture session is closed, the input {@link Surface} is abandoned and becomes invalid.</p>
*
* @return The {@link Surface} where reprocessing capture requests get the input images from. If
* this is not a reprocess capture session, {@code null} will be returned.