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}
Showing
Please register or sign in to comment