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

Unified Diff: media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java

Issue 834423003: Disable Camera2 API for devices with legacy hardware support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java
diff --git a/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java b/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java
index 9dc42889124f5a1b47929305c20542f178727457..802792b63f36f09672bace0980427d9c22db4a84 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java
+++ b/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java
@@ -274,6 +274,14 @@ public class VideoCaptureCamera2 extends VideoCapture {
}
}
+ static boolean isLegacyDevice(Context appContext, int id) {
+ final CameraCharacteristics cameraCharacteristics =
+ getCameraCharacteristics(appContext, id);
perkj_chrome 2015/01/12 13:51:56 weird indentation
+ return cameraCharacteristics != null
+ && cameraCharacteristics.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL)
+ == CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY;
+ }
+
static int getNumberOfCameras(Context appContext) {
final CameraManager manager =
(CameraManager) appContext.getSystemService(Context.CAMERA_SERVICE);
« no previous file with comments | « no previous file | media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698