Use callback to update the icon of the direct share app
Reported by
ltian@chromium.org,
Jun 5 2017
|
||
Issue descriptionFunction getShareableIconAndName() in ShareHelper to update the icon of the direct share app blocks the UI. The right way should be return nothing on AsyncTask and when icon is retrieved, have a callback to update the menu icon.
,
Aug 2
Updated this site slightly so that we do work on UI thread, since we were blocking on the background thread before.
,
Aug 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e819edb813b0d9fec26cb7687b5243fadc6babc6 commit e819edb813b0d9fec26cb7687b5243fadc6babc6 Author: Sam Maier <smaier@chromium.org> Date: Tue Aug 07 19:45:25 2018 Android: making ShareHelper usage of AsyncTask explicit Currently, AsyncTask.execute() defaults to the SERIAL_EXECUTOR. This exector is good for preventing concurrency errors since it guarantees serial execution, but bad for performance since the entire app shares this single queue. We are using SERIAL_EXECUTOR in clearSharedImages and shareImage since they don't appear to be thread safe, and they could potentially be called multiple times. We are using the UI thread in getShareableIconAndName since we immediately call get() on it anyway. This negates any benefit for having an AsyncTask. Bug: 869907 , 729737 Change-Id: I9ea44efba2155bb2b643f6d4d8f2b38c8365f418 Reviewed-on: https://chromium-review.googlesource.com/1161218 Commit-Queue: Sam Maier <smaier@chromium.org> Reviewed-by: Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#581308} [modify] https://crrev.com/e819edb813b0d9fec26cb7687b5243fadc6babc6/chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java |
||
►
Sign in to add a comment |
||
Comment 1 by ltian@chromium.org
, Jun 11 2018