New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 729737 link

Starred by 1 user

Issue metadata

Status: Available
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

Use callback to update the icon of the direct share app

Reported by ltian@chromium.org, Jun 5 2017

Issue description

Function 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.



 

Comment 1 by ltian@chromium.org, Jun 11 2018

Status: WontFix (was: Assigned)
Cc: dtrainor@chromium.org
Status: Available (was: WontFix)
Updated this site slightly so that we do work on UI thread, since we were blocking on the background thread before.
Project Member

Comment 3 by bugdroid1@chromium.org, 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