Fix ShelfNavigationWidget metrics reporting
Update shelf navigation widget metrics reporter to use the hotseat state from the time of reporter callback creation to select which hotseat state dependant metric to report. Note that shelf component layout happens after the hotseat state is set, so the hotseat state should have the desired value by the time navigation widget transitions start. The report callback is run asynchronously from the time the animation completes, so the hotseat state can change between the hotseat animation changing and the reporter callback running (e.g. if an app window is closed just after the animation to hidden hotseat ends, which may happen in perf tests). With the existing logic, where the reporter uses the current hotseat state to select the histogram to report, the animation may get registered for an incorrect transition. Also, when animating home button bounds, do not request animation, and create metrics reporter if the view is already animating to the same target bounds. BUG=1108641 TEST=ran ui.HotseatAnimation tast tests a couple of times Change-Id: Idde82ce98545d7ee7e54170abea588c9793e6d3d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333141Reviewed-by:Andrew Xu <andrewxu@chromium.org> Commit-Queue: Toni Baržić <tbarzic@chromium.org> Cr-Commit-Position: refs/heads/master@{#793793}
Showing
Please register or sign in to comment