com.android.ide.common.rendering.api
Class LayoutLog

java.lang.Object
  extended by com.android.ide.common.rendering.api.LayoutLog

public class LayoutLog
extends java.lang.Object

Log class for actions executed through Bridge and RenderSession.


Field Summary
static java.lang.String TAG_BROKEN
          Tag for error when something really unexpected happens.
static java.lang.String TAG_COLORFILTER
          Fidelity Tag used when a color filter type is used but is not supported.
static java.lang.String TAG_DRAWFILTER
          Fidelity Tag used when a draw filter type is used but is not supported.
static java.lang.String TAG_MASKFILTER
          Fidelity Tag used when a mask filter type is used but is not supported.
static java.lang.String TAG_MATRIX_AFFINE
          Fidelity Tag used when a non affine transformation matrix is used in a Java API.
static java.lang.String TAG_MATRIX_INVERSE
          Tag used when a matrix cannot be inverted.
static java.lang.String TAG_MATRIX_PREFIX
          Prefix for matrix warnings/errors.
static java.lang.String TAG_PATHEFFECT
          Fidelity Tag used when a path effect type is used but is not supported.
static java.lang.String TAG_RASTERIZER
          Fidelity Tag used when a rasterize type is used but is not supported.
static java.lang.String TAG_RESOURCES_FORMAT
          Tag for wrong format in a resource value.
static java.lang.String TAG_RESOURCES_PREFIX
          Prefix for resource warnings/errors.
static java.lang.String TAG_RESOURCES_READ
          Tag for failure when reading the content of a resource file.
static java.lang.String TAG_RESOURCES_RESOLVE
          Tag for resource resolution failure.
static java.lang.String TAG_RESOURCES_RESOLVE_THEME_ATTR
          Tag for resource resolution failure, specifically for theme attributes.
static java.lang.String TAG_SHADER
          Fidelity Tag used when a shader type is used but is not supported.
static java.lang.String TAG_STRFTIME
          Fidelity Tag used when an unrecognized format is found for strftime.
static java.lang.String TAG_UNSUPPORTED
          Tag for unsupported feature that can have a big impact on the rendering.
static java.lang.String TAG_XFERMODE
          Fidelity Tag used when a xfermode type is used but is not supported.
 
Constructor Summary
LayoutLog()
           
 
Method Summary
 void error(java.lang.String tag, java.lang.String message, java.lang.Object data)
          Logs an error.
 void error(java.lang.String tag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object data)
          Logs an error, and the Throwable that triggered it.
 void fidelityWarning(java.lang.String tag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object data)
          Logs a fidelity warning.
 void warning(java.lang.String tag, java.lang.String message, java.lang.Object data)
          Logs a warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_RESOURCES_PREFIX

public static final java.lang.String TAG_RESOURCES_PREFIX
Prefix for resource warnings/errors. This is not meant to be used as-is by the Layout Library, but is there to help test against a wider type of warning/error.

tag.startsWith(LayoutLog.TAG_RESOURCE_PREFIX will test if the tag is any type of resource warning/error

See Also:
Constant Field Values

TAG_MATRIX_PREFIX

public static final java.lang.String TAG_MATRIX_PREFIX
Prefix for matrix warnings/errors. This is not meant to be used as-is by the Layout Library, but is there to help test against a wider type of warning/error.

tag.startsWith(LayoutLog.TAG_MATRIX_PREFIX will test if the tag is any type of matrix warning/error

See Also:
Constant Field Values

TAG_UNSUPPORTED

public static final java.lang.String TAG_UNSUPPORTED
Tag for unsupported feature that can have a big impact on the rendering. For instance, aild access.

See Also:
Constant Field Values

TAG_BROKEN

public static final java.lang.String TAG_BROKEN
Tag for error when something really unexpected happens.

See Also:
Constant Field Values

TAG_RESOURCES_RESOLVE

public static final java.lang.String TAG_RESOURCES_RESOLVE
Tag for resource resolution failure. In this case the warning/error data object will be a ResourceValue containing the type and name of the resource that failed to resolve

See Also:
Constant Field Values

TAG_RESOURCES_RESOLVE_THEME_ATTR

public static final java.lang.String TAG_RESOURCES_RESOLVE_THEME_ATTR
Tag for resource resolution failure, specifically for theme attributes. In this case the warning/error data object will be a ResourceValue containing the type and name of the resource that failed to resolve

See Also:
Constant Field Values

TAG_RESOURCES_READ

public static final java.lang.String TAG_RESOURCES_READ
Tag for failure when reading the content of a resource file.

See Also:
Constant Field Values

TAG_RESOURCES_FORMAT

public static final java.lang.String TAG_RESOURCES_FORMAT
Tag for wrong format in a resource value.

See Also:
Constant Field Values

TAG_MATRIX_AFFINE

public static final java.lang.String TAG_MATRIX_AFFINE
Fidelity Tag used when a non affine transformation matrix is used in a Java API.

See Also:
Constant Field Values

TAG_MATRIX_INVERSE

public static final java.lang.String TAG_MATRIX_INVERSE
Tag used when a matrix cannot be inverted.

See Also:
Constant Field Values

TAG_MASKFILTER

public static final java.lang.String TAG_MASKFILTER
Fidelity Tag used when a mask filter type is used but is not supported.

See Also:
Constant Field Values

TAG_DRAWFILTER

public static final java.lang.String TAG_DRAWFILTER
Fidelity Tag used when a draw filter type is used but is not supported.

See Also:
Constant Field Values

TAG_PATHEFFECT

public static final java.lang.String TAG_PATHEFFECT
Fidelity Tag used when a path effect type is used but is not supported.

See Also:
Constant Field Values

TAG_COLORFILTER

public static final java.lang.String TAG_COLORFILTER
Fidelity Tag used when a color filter type is used but is not supported.

See Also:
Constant Field Values

TAG_RASTERIZER

public static final java.lang.String TAG_RASTERIZER
Fidelity Tag used when a rasterize type is used but is not supported.

See Also:
Constant Field Values

TAG_SHADER

public static final java.lang.String TAG_SHADER
Fidelity Tag used when a shader type is used but is not supported.

See Also:
Constant Field Values

TAG_STRFTIME

public static final java.lang.String TAG_STRFTIME
Fidelity Tag used when an unrecognized format is found for strftime.

See Also:
Constant Field Values

TAG_XFERMODE

public static final java.lang.String TAG_XFERMODE
Fidelity Tag used when a xfermode type is used but is not supported.

See Also:
Constant Field Values
Constructor Detail

LayoutLog

public LayoutLog()
Method Detail

warning

public void warning(java.lang.String tag,
                    java.lang.String message,
                    java.lang.Object data)
Logs a warning.

Parameters:
tag - a tag describing the type of the warning
message - the message of the warning
data - an optional data bundle that the client can use to improve the warning display.

fidelityWarning

public void fidelityWarning(java.lang.String tag,
                            java.lang.String message,
                            java.lang.Throwable throwable,
                            java.lang.Object data)
Logs a fidelity warning. This type of warning indicates that the render will not be the same as the rendering on a device due to limitation of the Java rendering API.

Parameters:
tag - a tag describing the type of the warning
message - the message of the warning
throwable - an optional Throwable that triggered the warning
data - an optional data bundle that the client can use to improve the warning display.

error

public void error(java.lang.String tag,
                  java.lang.String message,
                  java.lang.Object data)
Logs an error.

Parameters:
tag - a tag describing the type of the error
message - the message of the error
data - an optional data bundle that the client can use to improve the error display.

error

public void error(java.lang.String tag,
                  java.lang.String message,
                  java.lang.Throwable throwable,
                  java.lang.Object data)
Logs an error, and the Throwable that triggered it.

Parameters:
tag - a tag describing the type of the error
message - the message of the error
throwable - the Throwable that triggered the error
data - an optional data bundle that the client can use to improve the error display.