Stay organized with collections Save and categorize content based on your preferences. TrustedPresentationThresholds
class TrustedPresentationThresholds : Parcelable
Threshold values that are sent with android.view.WindowManager#registerTrustedPresentationListener(IBinder, * TrustedPresentationThresholds, Executor, Consumer)
Summary
| Inherited constants |
From class Parcelable Int | CONTENTS_FILE_DESCRIPTOR Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor. | Int | PARCELABLE_WRITE_RETURN_VALUE Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point. | |
| Public constructors |
| Creates a new TrustedPresentationThresholds. |
| Public methods |
| Int | |
| Boolean | |
| 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 | |
Public constructors
TrustedPresentationThresholds
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 0.0f and 1.0f inclusive |
minFractionRendered | Float: The min fraction of the Window that was presented to the user to be considered inside the threshold. Value is between 0.0f and 1.0f inclusive |
stabilityRequirementMs | Int: The time in milliseconds required for the Window to be in the threshold. Value is 1 or greater |
Public methods
describeContents
fun describeContents(): Int
equals
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
fun getMinAlpha(): Float
The min alpha the Window is required to have to be considered inside the threshold.
| Return |
Float | Value is between 0.0f and 1.0f inclusive |
getMinFractionRendered
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 0.0f and 1.0f inclusive |
getStabilityRequirementMillis
fun getStabilityRequirementMillis(): Int
The time in milliseconds required for the Window to be in the threshold.
| Return |
Int | Value is 1 or greater |
hashCode
fun hashCode(): Int
| Return |
Int | a hash code value for this object. |
toString
fun toString(): String
| Return |
String | a string representation of the object. |
Properties
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[],[]]