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

Issue metadata

Status: Fixed
Closed: Oct 2013
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: ----

Sign in to add a comment

Issue 298446: Application shortcuts: Choose largest icon over apple-touch-icon

Reported by, Sep 25 2013 Project Member

Issue description

In the current implementation of app shortcuts in Clank, we prefer apple-touch-icon over favicon when both are available. 

Instead, the icon that is used to install to the home screen should be determined by using the largest icon found in one of these three <link> tags:
<link rel=”shortcut icon” sizes=”128x128” href=”niceicon.png”>
<link rel=”apple-touch-icon” sizes=”128x128” href=”niceicon.png” >
<link rel=”apple-touch-icon-precomposed” sizes=”128x128” href=”niceicon.png”>

This would pave the way for deprecating apple-* icons in the future. 

Assigning to michaelbai@ as he implemented this logic in Clank before.

Comment 1 by, Sep 30 2013

Is there design doc?

Comment 2 by, Oct 1 2013

Above is HTML5 spec for icon. I believe chromium already handle the case where there are more than one "icon" are used according to the following rule.

"If multiple icons are provided, the user agent must select the most appropriate icon according to the type, media, and sizes attributes."

We need to make sure "apple-touch-icon" are in the list when picking the appropriate icon. If they are the same size, non apple is favorite.

Comment 3 by, Oct 1 2013

Sorry, I meant the design doc of app shortcuts.

Comment 5 by, Oct 1 2013

Labels: -ReleaseBlock-Beta ReleaseBlock-Stable

Comment 6 by, Oct 2 2013

Just have a quick look, the ShortCutBuilder should already retrieve the largest icon. Did we find anything wrong?

Comment 7 by, Oct 2 2013

Can you check whether chromium support multiple "icon" and "shortcut icon"?

Comment 9 by, Oct 2 2013

Great. Then I think we want to make sure to favor Favicon instead of TouchIcon when they have the same size. In the current recommendation, we suggest bigger one for "shortcut icon", e.g. 1024x1024. Then does our code handle the display correctly when showing on the homescreen?

Comment 10 by, Oct 2 2013

Just as a side note: I was trying to determine the logic of where the
favicon is pulled from the other day and I couldn't determine if it was the
first one detected from the html (or well-known location) that was inserted
into the data store, or the largest one found that is chosen.  My
preference is: Favicon from <link rel="shortcut icon" (largest->smallest),
if none then apple-touch-* else favicon.ico

Comment 11 by, Oct 2 2013

I missed one feature, in order to save the space, chrome limited maximum size of icon saved, currently the icon is 32*32, touch icon is 144*144, we need to determine maximum icon we want, it maybe 144*144?

Comment 12 by, Oct 2 2013

As to the icon's priority, apple-touch-icon might bigger than 'icon' or 'shortcut icon', like

Comment 13 by, Oct 2 2013

My goal would be to encourage developers to use the standard mechanisms for specifying larger icons over the proprietary (albeit popular) apple-touch-icon* method.  Additionally Apple-touch-icon encourages developers to make their icons iOS'esque which don't fit well in to other platforms.

Comment 14 by, Oct 3 2013

FYI, the spec says the last one in the tree order when parsing and it should be also the appropriate one decided by the user agent.

In the recommendation, we want to enforce 1024x1024 and optional 192x192. For the current  Android devices, we will use 192x192. But in the future, we may use higher resolution one.

So we should at least change the max icon to be 192x192.

Comment 15 by, Oct 3 2013

So, our goal is

1. Change the icon's priority to 
any icon larger than  favicon(32x32) -> apple-touch-icon -> favicon.

2. Icon size is no more than 192x192.

3. Aboves also apply to the browser.

Comment 16 by, Oct 3 2013

That is a fair goal for M31. Thanks.

Comment 17 by, Oct 9 2013

michaelbai@: How common are 32x32 apple-touch-icons?

Comment 18 by, Oct 9 2013

I downloaded a couple of thousand the other day and I see some 48x48, more 57x57, 72x72, 114x114.  I haven't come across a 32x32 one yet.

Comment 19 by, Oct 9 2013

Sorry, that is typo, it should be normal favicon 16x16 one.

Comment 20 by, Oct 21 2013

Project Member

Comment 21 by, Oct 24 2013

Michael, can you request a merge?

Comment 22 by, Oct 24 2013

This is the criteria to generate 'page-style' icon or not

To avoid generating the page-style icon, the icon has to be larger than the half size of ActivityManager.getLauncherLargeIconSize()

Comment 24 by, Oct 26 2013

Project Member

Comment 25 by, Oct 27 2013

Project Member
Project  : .../internal/apps
Branch   : master
Author   : Tao Bai <>
Committer: Newton Allen <>
Commit   : 8bed4851a921b2547f8f85b4ec47c9f5099725d6

Code Review +2: Dan Alcantara
Verified    +1: Tao Bai
Change-Id     : Ifab8267907660031b6ddd23d603a781cbaa7633e
Reviewed-at   :

Comment 26 by, Oct 28 2013

Labels: Merge-Requested

Comment 27 by, Oct 28 2013

Labels: -Merge-Requested Merge-Rejected
We're too late in the cycle for this type of a change (much less 4 CLs).

Comment 28 by, Oct 29 2013

Labels: -M-31 -Merge-Rejected M-32
Status: Fixed
Moving this to M32 and marking it fixed.

Comment 29 by, Aug 25 2014

Labels: -Restrict-View-Google

Comment 30 by, Oct 6 2014

I believe this limit is only for the size we saved on the disk.

What happen if the icon size is more than 192x192? I assume we scale it down instead of not using it, right?

Comment 31 by, Oct 6 2014

No, We don't download the icon larger than 192x192.

Comment 32 by, Oct 6 2014

We should have limitation of the icon size we download, for example, we shouldn't download 1024x1024 image and scale it down to 192x192.

Comment 33 by, Oct 6 2014

In #11, you said "chrome limited maximum size of icon saved".

There is no need to save more than we can display. So we should limit the saved size to the max display size. Sounds like currently it is 192x192.

Comment 34 by, Oct 6 2014

Currently the maximum icon we download and save are same -192x192. It seemed like you want us to download the icon larger than 192x192, if so, we need to define the size of icon we stop downloading.

Comment 35 by, Oct 6 2014

Why we need to limit the download icon size?

Comment 36 by, Oct 6 2014

We can't download any size of image, right? it uses the bandwidth and memory for scaling. The image will be decoded in renderer to make sure it has no harm to browser. Currently the scaling down the image is in UI thread, we should move it to other thread if the downloaded image is too large.

Comment 37 by, Oct 6 2014

Download image should be limited by standard image download size, which is quite big. The saved image, which is also the decoded size, should be limited to max saved icon size, which is 192x192 for now. None of this should happen in UI thread.

Comment 38 by, Oct 6 2014

OK, I will file a bug and work on it.

Comment 39 by, Oct 6 2014


Sign in to add a comment