fix phone titlebar
Change-Id: I76908b1cf4eb61f64c3531c75e589f1b80bdaaba
diff --git a/src/com/android/browser/TitleBarBase.java b/src/com/android/browser/TitleBarBase.java
index 284fe12..7897b65 100644
--- a/src/com/android/browser/TitleBarBase.java
+++ b/src/com/android/browser/TitleBarBase.java
@@ -73,7 +73,6 @@
protected ImageView mFavicon;
protected ImageView mLockIcon;
- protected Drawable mGenericFavicon;
protected UiController mUiController;
protected BaseUi mBaseUi;
protected FrameLayout mParent;
@@ -106,8 +105,6 @@
mUiController = controller;
mBaseUi = ui;
mParent = parent;
- mGenericFavicon = context.getResources().getDrawable(
- R.drawable.app_web_browser_sm);
}
protected void initLayout(Context context, int layoutId) {
@@ -311,20 +308,7 @@
}
/* package */ void setFavicon(Bitmap icon) {
- assert mFavicon != null;
- Drawable[] array = new Drawable[3];
- array[0] = new PaintDrawable(Color.BLACK);
- PaintDrawable p = new PaintDrawable(Color.WHITE);
- array[1] = p;
- if (icon == null) {
- array[2] = mGenericFavicon;
- } else {
- array[2] = new BitmapDrawable(icon);
- }
- LayerDrawable d = new LayerDrawable(array);
- d.setLayerInset(1, 1, 1, 1, 1);
- d.setLayerInset(2, 2, 2, 2, 2);
- mFavicon.setImageDrawable(d);
+ mFavicon.setImageDrawable(mBaseUi.getFaviconDrawable(icon));
}
public int getEmbeddedHeight() {