Stay organized with collections
Save and categorize content based on your preferences.
GpuHeadroomParams
class GpuHeadroomParams
Headroom request params used by SystemHealthManager.getGpuHeadroom(GpuHeadroomParams)
.
This class is immutable and one should use the Builder
to build a new instance.
Summary
Constants |
static Int |
The headroom calculation type bases on average value over a specified window.
|
static Int |
The headroom calculation type bases on minimum value over a specified window.
|
static Int |
The maximum size of the window to compute the headroom over.
|
static Int |
The minimum size of the window to compute the headroom over.
|
Public methods |
Boolean |
|
Int |
Gets the headroom calculation type.
|
Int |
Gets the headroom calculation window size in milliseconds.
|
Int |
|
String |
|
Constants
GPU_HEADROOM_CALCULATION_TYPE_AVERAGE
static val GPU_HEADROOM_CALCULATION_TYPE_AVERAGE: Int
The headroom calculation type bases on average value over a specified window.
Value: 1
GPU_HEADROOM_CALCULATION_TYPE_MIN
static val GPU_HEADROOM_CALCULATION_TYPE_MIN: Int
The headroom calculation type bases on minimum value over a specified window.
Value: 0
GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MAX
static val GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MAX: Int
The maximum size of the window to compute the headroom over.
Value: 10000
GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MIN
static val GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MIN: Int
The minimum size of the window to compute the headroom over.
Value: 50
Public methods
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. |
getCalculationType
fun getCalculationType(): Int
Gets the headroom calculation type.
This will return the default value chosen by the device if not set.
getCalculationWindowMillis
fun getCalculationWindowMillis(): Int
Gets the headroom calculation window size in milliseconds.
This will return the default value chosen by the device if not set.
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. |
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-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# GpuHeadroomParams\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nGpuHeadroomParams\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/GpuHeadroomParams \"View this page in Java\") \n\n```\nclass GpuHeadroomParams\n```\n\n|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.os.GpuHeadroomParams](#) |\n\nHeadroom request params used by [SystemHealthManager.getGpuHeadroom(GpuHeadroomParams)](/reference/kotlin/android/os/health/SystemHealthManager#getGpuHeadroom(android.os.GpuHeadroomParams)).\n\nThis class is immutable and one should use the [Builder](/reference/kotlin/android/os/GpuHeadroomParams.Builder) to build a new instance.\n\nSummary\n-------\n\n| Nested classes ||\n|---|--------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/os/GpuHeadroomParams.Builder) \u003cbr /\u003e |\n\n| Constants ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [GPU_HEADROOM_CALCULATION_TYPE_AVERAGE](#GPU_HEADROOM_CALCULATION_TYPE_AVERAGE:kotlin.Int) The headroom calculation type bases on average value over a specified window. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [GPU_HEADROOM_CALCULATION_TYPE_MIN](#GPU_HEADROOM_CALCULATION_TYPE_MIN:kotlin.Int) The headroom calculation type bases on minimum value over a specified window. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MAX](#GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MAX:kotlin.Int) The maximum size of the window to compute the headroom over. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MIN](#GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MIN:kotlin.Int) The minimum size of the window to compute the headroom over. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getCalculationType](#getCalculationType())`()` Gets the headroom calculation type. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getCalculationWindowMillis](#getCalculationWindowMillis())`()` Gets the headroom calculation window size in milliseconds. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\nConstants\n---------\n\n### GPU_HEADROOM_CALCULATION_TYPE_AVERAGE\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val GPU_HEADROOM_CALCULATION_TYPE_AVERAGE: Int\n```\n\nThe headroom calculation type bases on average value over a specified window. \n\n Value: 1\n\n### GPU_HEADROOM_CALCULATION_TYPE_MIN\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val GPU_HEADROOM_CALCULATION_TYPE_MIN: Int\n```\n\nThe headroom calculation type bases on minimum value over a specified window. \n\n Value: 0\n\n### GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MAX\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MAX: Int\n```\n\nThe maximum size of the window to compute the headroom over. \n\n Value: 10000\n\n### GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MIN\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val GPU_HEADROOM_CALCULATION_WINDOW_MILLIS_MIN: Int\n```\n\nThe minimum size of the window to compute the headroom over. \n\n Value: 50\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun equals(other: Any?): Boolean\n```\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | the reference object with which to compare. |\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if this object is the same as the obj argument; `false` otherwise. |\n\n### getCalculationType\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getCalculationType(): Int\n```\n\nGets the headroom calculation type.\n\nThis will return the default value chosen by the device if not set.\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is [android.os.GpuHeadroomParams#GPU_HEADROOM_CALCULATION_TYPE_MIN](#GPU_HEADROOM_CALCULATION_TYPE_MIN:kotlin.Int), or [android.os.GpuHeadroomParams#GPU_HEADROOM_CALCULATION_TYPE_AVERAGE](#GPU_HEADROOM_CALCULATION_TYPE_AVERAGE:kotlin.Int) |\n\n### getCalculationWindowMillis\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getCalculationWindowMillis(): Int\n```\n\nGets the headroom calculation window size in milliseconds.\n\nThis will return the default value chosen by the device if not set. \n\n### hashCode\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hashCode(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |\n\n### toString\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |"]]