Added in API level 31

DisplayHashManager

public final class DisplayHashManager
extends Object

java.lang.Object
   ↳ android.view.displayhash.DisplayHashManager


Manages DisplayHash requests. The manager object can be retrieved by calling Context.getSystemService(Context.DISPLAY_HASH_SERVICE)

Summary

Public methods

Set<String> getSupportedHashAlgorithms()

Get a Set of DisplayHash algorithms that the device supports.

VerifiedDisplayHash verifyDisplayHash(DisplayHash displayHash)

Call to verify that the DisplayHash passed in was generated by the system.

Inherited methods

Public methods

getSupportedHashAlgorithms

Added in API level 31
public Set<String> getSupportedHashAlgorithms ()

Get a Set of DisplayHash algorithms that the device supports.

Returns
Set<String> a String Set of supported hashing algorithms. The String value of one algorithm should be used when requesting to generate the DisplayHash. This value cannot be null.

verifyDisplayHash

Added in API level 31
public VerifiedDisplayHash verifyDisplayHash (DisplayHash displayHash)

Call to verify that the DisplayHash passed in was generated by the system.

Parameters
displayHash DisplayHash: The hash to verify that it was generated by the system. This value cannot be null.

Returns
VerifiedDisplayHash a VerifiedDisplayHash if the hash was generated by the system or null if the hash cannot be verified.