Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(789)

Unified Diff: webrtc/api/android/java/src/org/webrtc/CameraEnumerationAndroid.java

Issue 2448393003: Remove deprecated methods from CameraEnumerationAndroid. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/android/java/src/org/webrtc/Camera1Enumerator.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/android/java/src/org/webrtc/CameraEnumerationAndroid.java
diff --git a/webrtc/api/android/java/src/org/webrtc/CameraEnumerationAndroid.java b/webrtc/api/android/java/src/org/webrtc/CameraEnumerationAndroid.java
index 0295cf7b2fc47c4c2836fb4ad7ba551cbf085e1d..48ee1a373170fc945b403bd8d07b0918a1c356ce 100644
--- a/webrtc/api/android/java/src/org/webrtc/CameraEnumerationAndroid.java
+++ b/webrtc/api/android/java/src/org/webrtc/CameraEnumerationAndroid.java
@@ -13,7 +13,6 @@ package org.webrtc;
import static java.lang.Math.abs;
import android.graphics.ImageFormat;
-
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -114,51 +113,6 @@ public class CameraEnumerationAndroid {
}
}
- /**
- * @deprecated
- * Please use Camera1Enumerator.getDeviceNames() instead.
- */
- @Deprecated
- public static String[] getDeviceNames() {
- return new Camera1Enumerator().getDeviceNames();
- }
-
- /**
- * @deprecated
- * Please use Camera1Enumerator.getDeviceNames().length instead.
- */
- @Deprecated
- public static int getDeviceCount() {
- return new Camera1Enumerator().getDeviceNames().length;
- }
-
- /**
- * @deprecated
- * Please use Camera1Enumerator.getDeviceNames().get(index) instead.
- */
- @Deprecated
- public static String getDeviceName(int index) {
- return new Camera1Enumerator().getDeviceName(index);
- }
-
- /**
- * @deprecated
- * Please use Camera1Enumerator.isFrontFacing(String deviceName) instead.
- */
- @Deprecated
- public static String getNameOfFrontFacingDevice() {
- return getNameOfDevice(android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT);
- }
-
- /**
- * @deprecated
- * Please use Camera1Enumerator.isBackFacing(String deviceName) instead.
- */
- @Deprecated
- public static String getNameOfBackFacingDevice() {
- return getNameOfDevice(android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK);
- }
-
// Helper class for finding the closest supported format for the two functions below. It creates a
// comparator based on the difference to some requested parameters, where the element with the
// minimum difference is the element that is closest to the requested parameters.
@@ -215,19 +169,4 @@ public class CameraEnumerationAndroid {
}
});
}
-
- private static String getNameOfDevice(int facing) {
- final android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo();
- for (int i = 0; i < android.hardware.Camera.getNumberOfCameras(); ++i) {
- try {
- android.hardware.Camera.getCameraInfo(i, info);
- if (info.facing == facing) {
- return getDeviceName(i);
- }
- } catch (Exception e) {
- Logging.e(TAG, "getCameraInfo() failed on index " + i, e);
- }
- }
- return null;
- }
}
« no previous file with comments | « webrtc/api/android/java/src/org/webrtc/Camera1Enumerator.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698