# Print output for @column tags ?>
public
interface
DisplayHashResultCallback
android.view.displayhash.DisplayHashResultCallback |
Use when calling View#generateDisplayHash(String, Rect, Executor,
DisplayHashResultCallback)
.
The callback will only invoke either onDisplayHashResult(DisplayHash)
when the system successfully
generated the DisplayHash
or onDisplayHashError(int)
when it failed.
Constants | |
---|---|
int |
DISPLAY_HASH_ERROR_INVALID_BOUNDS
The bounds used when requesting the hash hash were invalid or empty. |
int |
DISPLAY_HASH_ERROR_INVALID_HASH_ALGORITHM
The hash algorithm sent to generate the hash was invalid. |
int |
DISPLAY_HASH_ERROR_MISSING_WINDOW
The window for the view that requested the hash is no longer around. |
int |
DISPLAY_HASH_ERROR_NOT_VISIBLE_ON_SCREEN
The view that requested the hash is not visible on screen. |
int |
DISPLAY_HASH_ERROR_TOO_MANY_REQUESTS
The caller requested to generate the hash too frequently. |
int |
DISPLAY_HASH_ERROR_UNKNOWN
An unknown error occurred. |
Public methods | |
---|---|
abstract
void
|
onDisplayHashError(int errorCode)
Callback invoked when
|
abstract
void
|
onDisplayHashResult(DisplayHash displayHash)
Callback invoked when calling
|
public static final int DISPLAY_HASH_ERROR_INVALID_BOUNDS
The bounds used when requesting the hash hash were invalid or empty.
Constant Value: -2 (0xfffffffe)
public static final int DISPLAY_HASH_ERROR_INVALID_HASH_ALGORITHM
The hash algorithm sent to generate the hash was invalid. This means the value is not one
of the supported values in DisplayHashManager#getSupportedHashAlgorithms()
Constant Value: -5 (0xfffffffb)
public static final int DISPLAY_HASH_ERROR_MISSING_WINDOW
The window for the view that requested the hash is no longer around. This can happen if the window is getting torn down.
Constant Value: -3 (0xfffffffd)
public static final int DISPLAY_HASH_ERROR_NOT_VISIBLE_ON_SCREEN
The view that requested the hash is not visible on screen. This could either mean that the view bounds are offscreen, window bounds are offscreen, view is not visible, or window is not visible.
Constant Value: -4 (0xfffffffc)
public static final int DISPLAY_HASH_ERROR_TOO_MANY_REQUESTS
The caller requested to generate the hash too frequently. The caller should try again at a after some time has passed to ensure the system isn't overloaded.
Constant Value: -6 (0xfffffffa)
public static final int DISPLAY_HASH_ERROR_UNKNOWN
An unknown error occurred.
Constant Value: -1 (0xffffffff)
public abstract void onDisplayHashError (int errorCode)
Callback invoked when
View.generateDisplayHash(String, Rect, Executor, DisplayHashResultCallback)
results in an error and cannot generate a display hash.
Parameters | |
---|---|
errorCode |
int : One of the values in DisplayHashErrorCode
Value is DISPLAY_HASH_ERROR_UNKNOWN , DISPLAY_HASH_ERROR_INVALID_BOUNDS , DISPLAY_HASH_ERROR_MISSING_WINDOW , DISPLAY_HASH_ERROR_NOT_VISIBLE_ON_SCREEN , DISPLAY_HASH_ERROR_INVALID_HASH_ALGORITHM , or DISPLAY_HASH_ERROR_TOO_MANY_REQUESTS |
public abstract void onDisplayHashResult (DisplayHash displayHash)
Callback invoked when calling
View.generateDisplayHash(String, Rect, Executor, DisplayHashResultCallback)
Parameters | |
---|---|
displayHash |
DisplayHash : The DisplayHash generated. If the hash cannot be generated,
onDisplayHashError(int) will be called instead
This value cannot be null . |