summaryrefslogtreecommitdiffstats
path: root/media/tests
diff options
context:
space:
mode:
authorChien-Yu Chen <cychen@google.com>2015-04-13 14:31:45 -0700
committerChien-Yu Chen <cychen@google.com>2015-04-23 15:21:07 -0700
commit7a316f6b1b040f0113161db87a36397aebfb80b8 (patch)
tree5d3200d1e2b5feac060335ee46dd32a592d13568 /media/tests
parent47fb5f1e41b05a77fe0ad9478d50212b897a42e3 (diff)
downloadframeworks_base-7a316f6b1b040f0113161db87a36397aebfb80b8.zip
frameworks_base-7a316f6b1b040f0113161db87a36397aebfb80b8.tar.gz
frameworks_base-7a316f6b1b040f0113161db87a36397aebfb80b8.tar.bz2
camera2: validate reprocess request's session
Add a session ID to CaptureResult to indicate the session where the result comes from. When creating a reprocess capture request with a capture result, the session ID will be carried over to the reprocess capture request. Reprocess capture request's session ID will be used to validate that it matches the session ID when submitting the reprocess capture request to a session. Bug: 20263212 Change-Id: I024c1a28ecf0a43909a0ed3814a11360c318417f
Diffstat (limited to 'media/tests')
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
index 6f33672..d71b44b 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
@@ -19,6 +19,7 @@ package com.android.mediaframeworktest.integration;
import android.graphics.ImageFormat;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.CameraCaptureSession;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.ICameraDeviceCallbacks;
@@ -170,7 +171,8 @@ public class CameraDeviceBinderTest extends AndroidTestCase {
assertEquals(CameraBinderTestUtils.NO_ERROR, status);
assertFalse(metadata.isEmpty());
- CaptureRequest.Builder request = new CaptureRequest.Builder(metadata, /*reprocess*/false);
+ CaptureRequest.Builder request = new CaptureRequest.Builder(metadata, /*reprocess*/false,
+ CameraCaptureSession.SESSION_ID_NONE);
assertFalse(request.isEmpty());
assertFalse(metadata.isEmpty());
if (needStream) {