| Index: webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
|
| diff --git a/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
|
| index 7c9872d25fb1ff17d6bc07c0888c584a98ac2728..8bff1e1d302acb095bf8487d9d38cc933c259afc 100644
|
| --- a/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
|
| +++ b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
|
| @@ -12,7 +12,6 @@ package org.webrtc;
|
| import android.test.ActivityTestCase;
|
| import android.test.suitebuilder.annotation.MediumTest;
|
| import android.test.suitebuilder.annotation.SmallTest;
|
| -import android.util.Size;
|
|
|
| import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
|
|
|
| @@ -38,22 +37,22 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
|
| if (!Camera2Enumerator.isSupported()) {
|
| return;
|
| }
|
| - final CameraEnumerationAndroid.Enumerator camera1Enumerator = new CameraEnumerator();
|
| + final CameraEnumerationAndroid.Enumerator camera1Enumerator = new Camera1Enumerator();
|
| final CameraEnumerationAndroid.Enumerator camera2Enumerator =
|
| new Camera2Enumerator(getInstrumentation().getContext());
|
|
|
| for (int i = 0; i < CameraEnumerationAndroid.getDeviceCount(); ++i) {
|
| - final Set<Size> resolutions1 = new HashSet<Size>();
|
| + final Set<CaptureFormat.Size> resolutions1 = new HashSet<CaptureFormat.Size>();
|
| for (CaptureFormat format : camera1Enumerator.getSupportedFormats(i)) {
|
| - resolutions1.add(new Size(format.width, format.height));
|
| + resolutions1.add(format.size);
|
| }
|
| - final Set<Size> resolutions2 = new HashSet<Size>();
|
| + final Set<CaptureFormat.Size> resolutions2 = new HashSet<CaptureFormat.Size>();
|
| for (CaptureFormat format : camera2Enumerator.getSupportedFormats(i)) {
|
| - resolutions2.add(new Size(format.width, format.height));
|
| + resolutions2.add(format.size);
|
| }
|
| - for (Size size : resolutions1) {
|
| - if (size.getWidth() >= 320 && size.getHeight() >= 240
|
| - && size.getWidth() <= 1280 && size.getHeight() <= 720) {
|
| + for (CaptureFormat.Size size : resolutions1) {
|
| + if (size.width >= 320 && size.height >= 240
|
| + && size.width <= 1280 && size.height <= 720) {
|
| assertTrue(resolutions2.contains(size));
|
| }
|
| }
|
|
|