Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java |
index 3a3992b99a467f60e31c7084c105cc56e2a47ba6..d6dfa1f7ca22cbe28902de51786dffac8436df0e 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java |
@@ -63,6 +63,8 @@ public class WebappActivity extends FullScreenActivity { |
private WebappUma mWebappUma; |
+ private Bitmap mLargestFavicon; |
+ |
/** |
* Construct all the variables that shouldn't change. We do it here both to clarify when the |
* objects are created and to ensure that they exist throughout the parallelized initialization |
@@ -287,6 +289,7 @@ public class WebappActivity extends FullScreenActivity { |
protected TabObserver createTabObserver() { |
return new EmptyTabObserver() { |
+ |
@Override |
public void onSSLStateUpdated(Tab tab) { |
updateUrlBar(); |
@@ -313,9 +316,14 @@ public class WebappActivity extends FullScreenActivity { |
} |
@Override |
- public void onFaviconUpdated(Tab tab) { |
+ public void onFaviconUpdated(Tab tab, Bitmap icon) { |
if (!isWebappDomain()) return; |
- updateTaskDescription(); |
+ if (mWebappInfo.icon() != null) return; |
gone
2015/11/20 23:37:13
Why'd this new condition appear? Seems like we sh
Yusuf
2015/11/20 23:38:54
See updateTaskDescription where if there is an ico
Yusuf
2015/11/20 23:47:33
Done.
|
+ if (mLargestFavicon == null || icon.getWidth() > mLargestFavicon.getWidth() |
+ || icon.getHeight() > mLargestFavicon.getHeight()) { |
+ mLargestFavicon = icon; |
+ updateTaskDescription(); |
+ } |
} |
@Override |
@@ -391,7 +399,7 @@ public class WebappActivity extends FullScreenActivity { |
if (mWebappInfo.icon() != null) { |
icon = mWebappInfo.icon(); |
} else if (getActivityTab() != null) { |
- icon = getActivityTab().getFavicon(); |
+ icon = mLargestFavicon; |
} |
if (mBrandColor == null && mWebappInfo.hasValidThemeColor()) { |