[Android][Mfill] Cache subsqeuent accessory sheet updates
Currently, the keyboard accessory may show stale suggestions. This is because sheets are cached by adding them with `emplace` to a flat_map. `emplace` only adds an item if it isn't present, so the oldest, non-empty sheet (for a given tab) will be shown forever. This isn't immediately obvious since sheets are also pushed directly when they are updated but with indirect updates (e.g. updating another sheet), the stale value will override the new one. By using `insert_or_assign`, the newer value replaces the old one. Bug: 1140358, 1134119 Change-Id: I933ec47a1da596f58fa99d5b9bc481954122c2a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2489899Reviewed-by:Vasilii Sukhanov <vasilii@chromium.org> Commit-Queue: Friedrich [CET] <fhorschig@chromium.org> Cr-Commit-Position: refs/heads/master@{#820165}
Showing
Please register or sign in to comment