Added in API level 35

TrustedPresentationThresholds


class TrustedPresentationThresholds : Parcelable
kotlin.Any
   ↳ android.window.TrustedPresentationThresholds

Threshold values that are sent with android.view.WindowManager#registerTrustedPresentationListener(IBinder, * TrustedPresentationThresholds, Executor, Consumer)

Summary

Inherited constants
Public constructors
TrustedPresentationThresholds(minAlpha: Float, minFractionRendered: Float, stabilityRequirementMs: Int)

Creates a new TrustedPresentationThresholds.

Public methods
Int

Boolean
equals(other: Any?)

Float

The min alpha the Window is required to have to be considered inside the threshold.

Float

The min fraction of the Window that was presented to the user to be considered inside the threshold.

Int

The time in milliseconds required for the Window to be in the threshold.

Int

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<TrustedPresentationThresholds!>

Public constructors

TrustedPresentationThresholds

Added in API level 35
TrustedPresentationThresholds(
    minAlpha: Float,
    minFractionRendered: Float,
    stabilityRequirementMs: Int)

Creates a new TrustedPresentationThresholds.

Parameters
minAlpha Float: The min alpha the Window is required to have to be considered inside the threshold. Value is between 0f and 1f inclusive
minFractionRendered Float: The min fraction of the Window that was presented to the user to be considered inside the threshold. Value is between 0f and 1f inclusive
stabilityRequirementMs Int: The time in milliseconds required for the Window to be in the threshold. Value is 1 or greater

Public methods

describeContents

Added in API level 35
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

equals

Added in API level 35
fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getMinAlpha

Added in API level 35
fun getMinAlpha(): Float

The min alpha the Window is required to have to be considered inside the threshold.

Return
Float Value is between 0f and 1f inclusive

getMinFractionRendered

Added in API level 35
fun getMinFractionRendered(): Float

The min fraction of the Window that was presented to the user to be considered inside the threshold.

Return
Float Value is between 0f and 1f inclusive

getStabilityRequirementMillis

Added in API level 35
fun getStabilityRequirementMillis(): Int

The time in milliseconds required for the Window to be in the threshold.

Return
Int Value is 1 or greater

hashCode

Added in API level 35
fun hashCode(): Int
Return
Int a hash code value for this object.

toString

Added in API level 35
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 35
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 35
static val CREATOR: Parcelable.Creator<TrustedPresentationThresholds!>