CpuHeadroomParams
class CpuHeadroomParams
kotlin.Any | |
↳ | android.os.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
Nested classes | |
---|---|
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. |
Public methods | |
---|---|
Boolean | |
Int |
Gets the headroom calculation type. |
Long |
Gets the headroom calculation window size in milliseconds. |
IntArray |
getTids() Gets the TIDs to track. |
Int |
hashCode() |
CpuHeadroomParams.Builder |
Returns a new builder with the same values as this object. |
String |
toString() |
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.
Return | |
---|---|
Int |
Value is android.os.CpuHeadroomParams#CPU_HEADROOM_CALCULATION_TYPE_MIN , or android.os.CpuHeadroomParams#CPU_HEADROOM_CALCULATION_TYPE_AVERAGE |
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. |
toBuilder
fun toBuilder(): CpuHeadroomParams.Builder
Returns a new builder with the same values as this object.
Return | |
---|---|
CpuHeadroomParams.Builder |
This value cannot be null . |
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |