PowerManager.ThermalHeadroomThresholds Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the thermal headroom thresholds for all available thermal throttling status above
#THERMAL_STATUS_NONE
.
public virtual System.Collections.Generic.IDictionary<Java.Lang.Integer,Java.Lang.Float> ThermalHeadroomThresholds { [Android.Runtime.Register("getThermalHeadroomThresholds", "()Ljava/util/Map;", "GetGetThermalHeadroomThresholdsHandler", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getThermalHeadroomThresholds", "()Ljava/util/Map;", "GetGetThermalHeadroomThresholdsHandler", ApiSince=35)>]
member this.ThermalHeadroomThresholds : System.Collections.Generic.IDictionary<Java.Lang.Integer, Java.Lang.Float>
Property Value
map from each thermal status to its thermal headroom
- Attributes
Remarks
Gets the thermal headroom thresholds for all available thermal throttling status above #THERMAL_STATUS_NONE
.
A thermal status key in the returned map is only set if the device manufacturer has the corresponding threshold defined for at least one of its sensors. If it's set, one should expect to see that from #getCurrentThermalStatus()
or OnThermalStatusChangedListener#onThermalStatusChanged(int)
.
The headroom threshold is used to interpret the possible thermal throttling status based on the headroom prediction. For example, if the headroom threshold for #THERMAL_STATUS_LIGHT
is 0.7, and a headroom prediction in 10s returns 0.75 (or getThermalHeadroom(10)=0.75
), one can expect that in 10 seconds the system could be in lightly throttled state if the workload remains the same. The app can consider taking actions according to the nearest throttling status the difference between the headroom and the threshold.
For new devices it's guaranteed to have a single sensor, but for older devices with multiple sensors reporting different threshold values, the minimum threshold is taken to be conservative on predictions. Thus, when reading real-time headroom, it's not guaranteed that a real-time value of 0.75 (or getThermalHeadroom(0)
=0.75) exceeding the threshold of 0.7 above will always come with lightly throttled state (or getCurrentThermalStatus()=THERMAL_STATUS_LIGHT
) but it can be lower (or getCurrentThermalStatus()=THERMAL_STATUS_NONE
). While it's always guaranteed that the device won't be throttled heavier than the unmet threshold's state, so a real-time headroom of 0.75 will never come with #THERMAL_STATUS_MODERATE
but lower, and 0.65 will never come with #THERMAL_STATUS_LIGHT
but #THERMAL_STATUS_NONE
.
The returned map of thresholds will not change between calls to this function, so it's best to call this once on initialization. Modifying the result will not change the thresholds cached by the system, and a new call to the API will get a new copy.
Java documentation for android.os.PowerManager.getThermalHeadroomThresholds()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.