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

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

Issue 2124363003: ImageCapture: Implement focus mode for Android and Fake Video Capture Devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reillyg@s nit, dcheng@ comment and updated webexposed/global-interface-listing-expected.txt Created 4 years, 5 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
Index: media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
diff --git a/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java b/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
index 3467e81dd4564190f333ffb100108b57623cd2a1..51a32dc31a2e7f14fddbd14a8d48486c5d03cbb1 100644
--- a/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
+++ b/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
@@ -572,7 +572,12 @@ public class VideoCaptureCamera2 extends VideoCapture {
/ cameraCharacteristics.get(CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE)
.width();
- return new PhotoCapabilities(maxZoom, minZoom, currentZoom);
+ final int focusMode = mPreviewRequest.get(CaptureRequest.CONTROL_AF_MODE);
+ Log.d(TAG, "focusMode " + focusMode);
+ final boolean isFocusManual = (focusMode == CameraMetadata.CONTROL_AF_MODE_OFF)
+ || (focusMode == CameraMetadata.CONTROL_AF_MODE_EDOF);
+
+ return new PhotoCapabilities(maxZoom, minZoom, currentZoom, !isFocusManual);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698