[Adaptation] Trigger OnThermalStateChange on adding a PeerConnection.
The OS mostly only generates OnThermalStateChange events when thermals changes. Without this CL, PeerConnection that are created after such event won't know what the thermal state is initially. This CL fixes that so that PeerConnections can respond to poor thermal signals even if they were created late. By getting the current thermal state when the PeerConnectionTrackerHost is constructed the host will never miss reporting a thermal state to the PeerConnectionTracker. By remembering the latest thermal state, the PeerConnectionTracker can make sure to tell any PeerConnections that were added late what it is by sending OnThermalStateChange as part of registration. Bug: chromium:1098247 Change-Id: Id26e9d9f94f4d0c285b9466cb55e98f0bbce0c2c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2260552Reviewed-by:Guido Urdaneta <guidou@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#781728}
Showing
Please register or sign in to comment