Multiple fixes for Favicons
- Per Site Settings now uses SiteTiles and shows favicons
- New default Favicon
- Fixed missing Favicons on History items
Change-Id: Ia0317694ede81d62ce04e0693f9779f65030165c
diff --git a/src/com/android/browser/BrowserWebView.java b/src/com/android/browser/BrowserWebView.java
index 9aa044c..afcca1a 100644
--- a/src/com/android/browser/BrowserWebView.java
+++ b/src/com/android/browser/BrowserWebView.java
@@ -17,6 +17,8 @@
package com.android.browser;
import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.content.res.Resources;
import android.util.AttributeSet;
@@ -200,6 +202,16 @@
}
@Override
+ public Bitmap getFavicon() {
+ Tab currentTab = mTitleBar.getUiController().getCurrentTab();
+ if (currentTab != null){
+ return currentTab.getFavicon();
+ }
+ else return BitmapFactory.decodeResource(
+ this.getResources(), R.drawable.ic_deco_favicon_normal);
+ }
+
+ @Override
public boolean dispatchKeyEventPreIme(KeyEvent event) {
Tab currentTab = mTitleBar.getUiController().getCurrentTab();
if (currentTab != null && currentTab.isKeyboardShowing()){