Stay organized with collections
Save and categorize content based on your preferences.
CpuHeadroomParams
class CpuHeadroomParams
Headroom request params used by SystemHealthManager.getCpuHeadroom(CpuHeadroomParams)
.
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.
|
Constants
CPU_HEADROOM_CALCULATION_TYPE_AVERAGE
static val CPU_HEADROOM_CALCULATION_TYPE_AVERAGE: Int
The headroom calculation type bases on average value over a specified window.
Value: 1
CPU_HEADROOM_CALCULATION_TYPE_MIN
static val CPU_HEADROOM_CALCULATION_TYPE_MIN: Int
The headroom calculation type bases on minimum value over a specified window.
Value: 0
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(): Long
Gets the headroom calculation window size in milliseconds.
This will return the default value chosen by the device if not set.
getTids
fun getTids(): IntArray
Gets the TIDs to track.
This will return a copy of the TIDs in the params, or null if the params is 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,["# CpuHeadroomParams\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCpuHeadroomParams\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/CpuHeadroomParams \"View this page in Java\") \n\n```\nclass CpuHeadroomParams\n```\n\n|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.os.CpuHeadroomParams](#) |\n\nHeadroom request params used by [SystemHealthManager.getCpuHeadroom(CpuHeadroomParams)](/reference/kotlin/android/os/health/SystemHealthManager#getCpuHeadroom(android.os.CpuHeadroomParams)).\n\nThis class is immutable and one should use the [Builder](/reference/kotlin/android/os/CpuHeadroomParams.Builder) to build a new instance.\n\nSummary\n-------\n\n| Nested classes ||\n|---|--------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/os/CpuHeadroomParams.Builder) \u003cbr /\u003e |\n\n| Constants ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CPU_HEADROOM_CALCULATION_TYPE_AVERAGE](#CPU_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) | [CPU_HEADROOM_CALCULATION_TYPE_MIN](#CPU_HEADROOM_CALCULATION_TYPE_MIN:kotlin.Int) The headroom calculation type bases on minimum value over a specified window. |\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| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getCalculationWindowMillis](#getCalculationWindowMillis())`()` Gets the headroom calculation window size in milliseconds. |\n| [IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html) | [getTids](#getTids())`()` Gets the TIDs to track. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n| [CpuHeadroomParams.Builder](/reference/kotlin/android/os/CpuHeadroomParams.Builder) | [toBuilder](#toBuilder())`()` Returns a new builder with the same values as this object. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\nConstants\n---------\n\n### CPU_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 CPU_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### CPU_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 CPU_HEADROOM_CALCULATION_TYPE_MIN: Int\n```\n\nThe headroom calculation type bases on minimum value over a specified window. \n\n Value: 0\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.CpuHeadroomParams#CPU_HEADROOM_CALCULATION_TYPE_MIN](#CPU_HEADROOM_CALCULATION_TYPE_MIN:kotlin.Int), or [android.os.CpuHeadroomParams#CPU_HEADROOM_CALCULATION_TYPE_AVERAGE](#CPU_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(): Long\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### getTids\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getTids(): IntArray\n```\n\nGets the TIDs to track.\n\nThis will return a copy of the TIDs in the params, or null if the params is 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### toBuilder\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toBuilder(): CpuHeadroomParams.Builder\n```\n\nReturns a new builder with the same values as this object.\n\n| Return ||\n|-------------------------------------------------------------------------------------|------------------------------|\n| [CpuHeadroomParams.Builder](/reference/kotlin/android/os/CpuHeadroomParams.Builder) | This value cannot be `null`. |\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. |"]]