@@ -304,6 +304,26 @@ int AThermal_getThermalHeadroomThresholds(AThermalManager* _Nonnull manager,
304304 * Prototype of the function that is called when thermal headroom or thresholds changes.
305305 * It's passed the updated thermal headroom and thresholds as parameters, as well as the
306306 * pointer provided by the client that registered a callback.
307+ * <p>
308+ * This may not be used to fully replace the {@link AThermal_getThermalHeadroom} API as it will
309+ * only notify on one of the conditions below that will significantly change one or both
310+ * values of current headroom and headroom thresholds since previous callback:
311+ * 1. thermal throttling events: when the skin temperature has cross any of the thresholds
312+ * and there isn't a previous callback in a short time ago with similar values.
313+ * 2. skin temperature threshold change events: note that if the absolute °C threshold
314+ * values change in a way that does not significantly change the current headroom nor
315+ * headroom thresholds, it will not trigger any callback. The client should not
316+ * need to take action in such case since the difference from temperature vs threshold
317+ * hasn't changed.
318+ * <p>
319+ * By API version 36, it provides a forecast in the same call for developer's convenience
320+ * based on a {@code forecastSeconds} defined by the device, which can be static or dynamic
321+ * varied by OEM. Be aware that it will not notify on forecast temperature change but the
322+ * events mentioned above. So periodically polling against {@link AThermal_getThermalHeadroom}
323+ * API should still be used to actively monitor temperature forecast in advance.
324+ * <p>
325+ * This serves as a more advanced option compared to thermal status listener, where the
326+ * latter will only notify on thermal throttling events with status update.
307327 *
308328 * @param data The data pointer to be passed when callback is called.
309329 * @param headroom The current non-negative normalized headroom value, also see
0 commit comments