am 3054f595: Merge "Camera2: implement Key.toString()" into mnc-dev

* commit '3054f595146bbf8c71d4caaf1aad83252d5bcbea':
  Camera2: implement Key.toString()
This commit is contained in:
Chien-Yu Chen
2015-07-07 22:28:36 +00:00
committed by Android Git Automerger
3 changed files with 42 additions and 0 deletions

View File

@@ -115,6 +115,20 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
}
/**
* 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.
*

View File

@@ -149,6 +149,20 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
}
/**
* 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.
*

View File

@@ -126,6 +126,20 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
}
/**
* 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.
*