Index: webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java |
diff --git a/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java b/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java |
index 27b54dbe3eeaa2d1462ffdb63d270cca4f579a87..614105cd5df6fbc4392a96106b547f2d52568a7e 100644 |
--- a/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java |
+++ b/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java |
@@ -22,34 +22,10 @@ public class Camera1CapturerUsingTextureTest extends InstrumentationTestCase { |
static final String TAG = "Camera1CapturerUsingTextureTest"; |
private class TestObjectFactory |
- implements CameraVideoCapturerTestFixtures.TestObjectFactory { |
+ extends CameraVideoCapturerTestFixtures.TestObjectFactory { |
@Override |
- public CameraVideoCapturer createCapturer( |
- String name, |
- CameraVideoCapturer.CameraEventsHandler eventsHandler) { |
- return new VideoCapturerAndroid(name, eventsHandler, isCapturingToTexture()); |
- } |
- |
- @Override |
- public String getNameOfFrontFacingDevice() { |
- return CameraEnumerationAndroid.getNameOfFrontFacingDevice(); |
- } |
- |
- @Override |
- public String getNameOfBackFacingDevice() { |
- return CameraEnumerationAndroid.getNameOfBackFacingDevice(); |
- } |
- |
- // Return true if the device under test have at least two cameras. |
- @SuppressWarnings("deprecation") |
- @Override |
- public boolean haveTwoCameras() { |
- return (android.hardware.Camera.getNumberOfCameras() >= 2); |
- } |
- |
- @Override |
- public boolean isCapturingToTexture() { |
- return true; |
+ public CameraEnumerator getCameraEnumerator() { |
+ return new Camera1Enumerator(); |
} |
@Override |
@@ -60,7 +36,7 @@ public class Camera1CapturerUsingTextureTest extends InstrumentationTestCase { |
@SuppressWarnings("deprecation") |
@Override |
public Object rawOpenCamera(String cameraName) { |
- return android.hardware.Camera.open(CameraEnumerationAndroid.getCameraIndex(cameraName)); |
+ return android.hardware.Camera.open(Camera1Enumerator.getCameraIndex(cameraName)); |
} |
@SuppressWarnings("deprecation") |