Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2effe56f authored by Xiang Wang's avatar Xiang Wang Committed by Android (Google) Code Review
Browse files

Merge "Address the IThermal HAL API feedback" into main

parents 0d100347 fcdb8af5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -227,12 +227,12 @@ interface IThermal {
    void unregisterCoolingDeviceChangedCallback(in ICoolingDeviceChangedCallback callback);

    /**
     * Retrieves the forecasted skin temperature in Celsius.
     * Retrieves the forecasted {@link TemperatureType#SKIN} type temperature in Celsius.
     *
     * @param forecastSeconds the number of seconds to forecast the skin temperature, it should
     *                        at least support superset of [0, 60] seconds range.
     *                        support any value from a superset of range [0, 60] seconds.
     *
     * @return forecasted skin temperature in Celsius.
     * @return forecasted skin temperature in Celsius unit at the forecasted seconds in future.
     *
     * @throws EX_ILLEGAL_STATE If the Thermal HAL is not initialized successfully
     * @throws EX_ILLEGAL_ARGUMENT If the provided forecastSeconds is negative
+9 −4
Original line number Diff line number Diff line
@@ -26,8 +26,7 @@ import android.hardware.thermal.TemperatureThreshold;
@VintfStability
interface IThermalChangedCallback {
    /**
     * Send a thermal throttling event to all Thermal HAL
     * thermal event listeners.
     * Send a thermal throttling event to all Thermal HAL thermal event listeners.
     *
     * @param temperature The temperature associated with the
     *    throttling event.
@@ -35,8 +34,14 @@ interface IThermalChangedCallback {
    oneway void notifyThrottling(in Temperature temperature);

    /**
     * Send a thermal threshold change event to all Thermal HAL
     * thermal event listeners.
     * Send a thermal threshold change event to all Thermal HAL thermal event listeners.
     *
     * Some devices may change the thresholds based on hardware state or app workload changes.
     * While this is generally not recommended, it should be used with caution at low frequency
     * especially for the {@link TemperatureType#SKIN} type temperature thresholds. Since such
     * a skin type callback to system may trigger notifications to apps that have preivously
     * registered thermal headroom listeners with a new set of headroom and thresholds in case
     * any of them changed.
     *
     * @param threshold The temperature threshold that changed.
     */