diff options
Diffstat (limited to 'core/java/android/hardware')
3 files changed, 42 insertions, 0 deletions
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 835daab..6c74a9f 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -116,6 +116,20 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri } /** + * Return this {@link Key} as a string representation. + * + * <p>{@code "CameraCharacteristics.Key(%s)"}, where {@code %s} represents + * the name of this key as returned by {@link #getName}.</p> + * + * @return string representation of {@link Key} + */ + @NonNull + @Override + public String toString() { + return String.format("CameraCharacteristics.Key(%s)", mKey.getName()); + } + + /** * Visible for CameraMetadataNative implementation only; do not use. * * TODO: Make this private or remove it altogether. diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index f201fe9..6d8cc54 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -150,6 +150,20 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> } /** + * Return this {@link Key} as a string representation. + * + * <p>{@code "CaptureRequest.Key(%s)"}, where {@code %s} represents + * the name of this key as returned by {@link #getName}.</p> + * + * @return string representation of {@link Key} + */ + @NonNull + @Override + public String toString() { + return String.format("CaptureRequest.Key(%s)", mKey.getName()); + } + + /** * Visible for CameraMetadataNative implementation only; do not use. * * TODO: Make this private or remove it altogether. diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 0f80051..f7cf185 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -127,6 +127,20 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> { } /** + * Return this {@link Key} as a string representation. + * + * <p>{@code "CaptureResult.Key(%s)"}, where {@code %s} represents + * the name of this key as returned by {@link #getName}.</p> + * + * @return string representation of {@link Key} + */ + @NonNull + @Override + public String toString() { + return String.format("CaptureResult.Key(%s)", mKey.getName()); + } + + /** * Visible for CameraMetadataNative implementation only; do not use. * * TODO: Make this private or remove it altogether. |