diff --git a/api/current.txt b/api/current.txt index 5779ed7511f8a..4f76159f35eca 100644 --- a/api/current.txt +++ b/api/current.txt @@ -12682,7 +12682,7 @@ package android.hardware.camera2 { method public void onCaptureProgressed(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureResult); method public void onCaptureSequenceAborted(android.hardware.camera2.CameraCaptureSession, int); method public void onCaptureSequenceCompleted(android.hardware.camera2.CameraCaptureSession, int, long); - method public void onCaptureStarted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, long); + method public void onCaptureStarted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, long, long); } public static abstract class CameraCaptureSession.StateCallback { diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java index 29e42ea246b16..ce830288eed29 100644 --- a/core/java/android/hardware/camera2/CameraCaptureSession.java +++ b/core/java/android/hardware/camera2/CameraCaptureSession.java @@ -483,7 +483,9 @@ public abstract class CameraCaptureSession implements AutoCloseable { * and in the buffers sent to each output Surface. These buffer * timestamps are accessible through, for example, * {@link android.media.Image#getTimestamp() Image.getTimestamp()} or - * {@link android.graphics.SurfaceTexture#getTimestamp()}.
+ * {@link android.graphics.SurfaceTexture#getTimestamp()}. + * The frame number included is equal to the frame number that will be included in + * {@link CaptureResult#getFrameNumber}. * *For the simplest way to play a shutter sound camera shutter or a
* video recording start/stop sound, see the
@@ -494,9 +496,20 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @param session the session returned by {@link CameraDevice#createCaptureSession}
* @param request the request for the capture that just begun
* @param timestamp the timestamp at start of capture, in nanoseconds.
+ * @param frameNumber the frame number for this capture
*
* @see android.media.MediaActionSound
*/
+ public void onCaptureStarted(CameraCaptureSession session,
+ CaptureRequest request, long timestamp, long frameNumber) {
+ // Temporary trampoline for API change transition
+ onCaptureStarted(session, request, timestamp);
+ }
+
+ /**
+ * Temporary for API change transition
+ * @hide
+ */
public void onCaptureStarted(CameraCaptureSession session,
CaptureRequest request, long timestamp) {
// default empty implementation
diff --git a/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java b/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java
index 02c3d87acf2ea..c66a3a40718f5 100644
--- a/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java
+++ b/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java
@@ -48,7 +48,8 @@ public class MethodNameInvoker If more than one method exists in {@code targetClass}, the first method will be used. If more than one method exists in {@code targetClass}, the first method with the right
+ * number of arguments will be used, and later calls will all use that method.