Bug 922116 - Don't clear FaviconView image data in formatImage. r=lucasr,margaret

This commit is contained in:
Chris Kitching 2013-10-02 11:31:37 -04:00
parent 91c7eecd90
commit 6425aad4c2

View File

@ -64,7 +64,7 @@ public class FaviconView extends ImageView {
private void formatImage() {
// If we're called before bitmap is set, or before size is set, show blank.
if (mIconBitmap == null || mActualWidth == 0 || mActualHeight == 0) {
clearImage();
showNoImage();
return;
}
@ -157,12 +157,16 @@ public class FaviconView extends ImageView {
hideBackground();
}
private void showNoImage() {
setImageBitmap(null);
hideBackground();
}
/**
* Clear image and background shown by this view.
*/
public void clearImage() {
setImageResource(0);
hideBackground();
showNoImage();
mUnscaledBitmap = null;
mIconBitmap = null;
mIconKey = null;