diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2015-08-14 13:11:16 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2015-08-14 14:52:57 -0700 |
commit | 5717612ba9ac78021e81f5b45ca7903c318499f9 (patch) | |
tree | 91d5b680930f5fda68c41e727a15e42231367c9d /media/tests | |
parent | f75577295765ca13bf3d0d5bffa81b569cb88da2 (diff) | |
download | frameworks_base-5717612ba9ac78021e81f5b45ca7903c318499f9.zip frameworks_base-5717612ba9ac78021e81f5b45ca7903c318499f9.tar.gz frameworks_base-5717612ba9ac78021e81f5b45ca7903c318499f9.tar.bz2 |
Camera2: Add camera type to getNumberOfCameras.
Do not list strange cameras in old API; ensure new API gets all
cameras.
Bug: 23194168
Change-Id: Ia1fdffac245525674c913fefb1ec06e9094fe8d3
Diffstat (limited to 'media/tests')
-rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java index 14c2619..57969ba 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java @@ -56,6 +56,9 @@ public class CameraBinderTest extends AndroidTestCase { private static final int API_VERSION_1 = 1; private static final int API_VERSION_2 = 2; + private static final int CAMERA_TYPE_BACKWARD_COMPATIBLE = 0; + private static final int CAMERA_TYPE_ALL = 1; + protected CameraBinderTestUtils mUtils; public CameraBinderTest() { @@ -71,7 +74,7 @@ public class CameraBinderTest extends AndroidTestCase { @SmallTest public void testNumberOfCameras() throws Exception { - int numCameras = mUtils.getCameraService().getNumberOfCameras(); + int numCameras = mUtils.getCameraService().getNumberOfCameras(CAMERA_TYPE_ALL); assertTrue("At least this many cameras: " + mUtils.getGuessedNumCameras(), numCameras >= mUtils.getGuessedNumCameras()); Log.v(TAG, "Number of cameras " + numCameras); |