Skip updating the samples history on temperature change
The max headroom staleness of ignoring such adhoc temperature update is within 1 second, so we don't need to seed the value but let the looper update samples by itself. This will prevent other problems caused by race between callback update and looper update when two temperature samples updated within a short window can result in high error variance when calculating slope during linear regression, even if they have small value difference. If needed we can revisit this if a temperature can change drastically within a second on any device. Bug: 408509573 Test: atest ThermalManagerServiceTest Flag: EXEMPT bugfix Change-Id: Ide671ae13b52d5b291e20aab52e9db41058d44c1
Loading
Please register or sign in to comment