Query "post" targets only when rebuild complete.
When we perform our initial query and then kick off an async sorting task, we predictably see two list-ready callbacks, both with doPostProcessing=true, first with rebuildCompleted=false, then true. If we perform the post-processing step both times, we'll double-log events, double-query app prediction, etc. This is described in more detail in b/209018315. In this CL, we specifically ensure that the logging & APS query only occur when the async rebuild is complete. This is the minimal change to address the duplication while restoring the general conditions of how this flow worked prior to the introduction of the async step. In subsequent CLs, there's room to optimize this flow or polish other bugs that may have been introduced along with the async step; for more discussion see the comments on this CL. Note that we still have some disabled logging tests that were supposed to assert the correct flow step-by-step, but that regressed over time. Those tests will be re-enabled in a subsequent CL, where we'll presumably need to update the assertions to match the current flow. Test: manual + `atest ChooserActivityTest` Bug: 209018315 Change-Id: Ie1b786c46b4204ede26ab1face3f040dad77d26e
Loading
Please register or sign in to comment