summaryrefslogtreecommitdiffstats
path: root/media/tests
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2013-09-25 10:05:59 -0700
committerZhijun He <zhijunhe@google.com>2013-09-25 13:54:25 -0700
commit2001188be30649198972a3199a4322d6f7f5f93d (patch)
treef8a55ac2b29871615942c357442200abb6888b0c /media/tests
parent6a1e32efb686bd5606f62076c70f399ff3bdc37d (diff)
downloadframeworks_base-2001188be30649198972a3199a4322d6f7f5f93d.zip
frameworks_base-2001188be30649198972a3199a4322d6f7f5f93d.tar.gz
frameworks_base-2001188be30649198972a3199a4322d6f7f5f93d.tar.bz2
Camera2: Implement CameraManager#getCameraCharacteristics
Bug: 10904541 Bug: 10360518 Change-Id: I1da0b0319703fda46789f15a232e56ed1d928bc3
Diffstat (limited to 'media/tests')
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java12
1 files changed, 12 insertions, 0 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 9d8489c..aef61c7 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
@@ -68,6 +68,7 @@ public class CameraDeviceBinderTest extends AndroidTestCase {
}
class IsMetadataNotEmpty extends ArgumentMatcher<CameraMetadataNative> {
+ @Override
public boolean matches(Object obj) {
return !((CameraMetadataNative) obj).isEmpty();
}
@@ -273,6 +274,17 @@ public class CameraDeviceBinderTest extends AndroidTestCase {
}
@SmallTest
+ public void testCameraCharacteristics() throws RemoteException {
+ CameraMetadataNative info = new CameraMetadataNative();
+
+ int status = mUtils.getCameraService().getCameraCharacteristics(mCameraId, /*out*/info);
+ assertEquals(CameraBinderTestUtils.NO_ERROR, status);
+
+ assertFalse(info.isEmpty());
+ assertNotNull(info.get(CameraCharacteristics.SCALER_AVAILABLE_FORMATS));
+ }
+
+ @SmallTest
public void testWaitUntilIdle() throws Exception {
CaptureRequest.Builder builder = createDefaultBuilder(/* needStream */true);
int requestIdStreaming = submitCameraRequest(builder.build(), /* streaming */true);