Added in API level Baklava
Builder
class Builder
kotlin.Any | |
↳ | android.os.GpuHeadroomParams.Builder |
Summary
Public constructors | |
---|---|
Builder() |
|
Builder(params: GpuHeadroomParams) Returns a new builder with the same values as this object. |
Public methods | |
---|---|
GpuHeadroomParams |
build() Builds the |
GpuHeadroomParams.Builder |
setCalculationType(calculationType: Int) Sets the headroom calculation type. |
GpuHeadroomParams.Builder |
setCalculationWindowMillis(windowMillis: Int) Sets the headroom calculation window size in milliseconds. |
Public constructors
Builder
Added in API level Baklava
Builder(params: GpuHeadroomParams)
Returns a new builder with the same values as this object.
Parameters | |
---|---|
params |
GpuHeadroomParams: This value cannot be null . |
Public methods
build
Added in API level Baklava
fun build(): GpuHeadroomParams
Builds the GpuHeadroomParams
object.
Return | |
---|---|
GpuHeadroomParams |
This value cannot be null . |
setCalculationType
Added in API level Baklava
fun setCalculationType(calculationType: Int): GpuHeadroomParams.Builder
Sets the headroom calculation type.
Parameters | |
---|---|
calculationType |
Int: Value is android.os.GpuHeadroomParams#GPU_HEADROOM_CALCULATION_TYPE_MIN , or android.os.GpuHeadroomParams#GPU_HEADROOM_CALCULATION_TYPE_AVERAGE |
Return | |
---|---|
GpuHeadroomParams.Builder |
This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the type is invalid. |
setCalculationWindowMillis
Added in API level Baklava
fun setCalculationWindowMillis(windowMillis: Int): GpuHeadroomParams.Builder
Sets the headroom calculation window size in milliseconds.
Parameters | |
---|---|
windowMillis |
Int: the window size in milliseconds ranges from SystemHealthManager.getGpuHeadroomCalculationWindowRange() . The smaller the window size, the larger fluctuation in the headroom value should be expected. The default value can be retrieved from the GpuHeadroomParams.getCalculationWindowMillis . The device will try to use the closest feasible window size to this param. Value is 1 or greater |
Return | |
---|---|
GpuHeadroomParams.Builder |
This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the window is invalid. |