summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware
diff options
context:
space:
mode:
authorChien-Yu Chen <cychen@google.com>2015-07-07 22:16:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-07 22:17:08 +0000
commit3054f595146bbf8c71d4caaf1aad83252d5bcbea (patch)
tree8f5180a9f5674ac31dba9ba693ea8dace51d5222 /core/java/android/hardware
parentcffb98c8d77c743165d06f588ba5a5e424796349 (diff)
parent12a8385b7e403c6e1af6c824d3e77088242f89a7 (diff)
downloadframeworks_base-3054f595146bbf8c71d4caaf1aad83252d5bcbea.zip
frameworks_base-3054f595146bbf8c71d4caaf1aad83252d5bcbea.tar.gz
frameworks_base-3054f595146bbf8c71d4caaf1aad83252d5bcbea.tar.bz2
Merge "Camera2: implement Key.toString()" into mnc-dev
Diffstat (limited to 'core/java/android/hardware')
-rw-r--r--core/java/android/hardware/camera2/CameraCharacteristics.java14
-rw-r--r--core/java/android/hardware/camera2/CaptureRequest.java14
-rw-r--r--core/java/android/hardware/camera2/CaptureResult.java14
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.