Bug 1341275: Rm redundant check for size change in onSizeChanged. r=sebastian
onSizeChanged should only be called when the size actually changes. However,
I did notice weird behavior in the debugger where `formatImage` appeared to be
called twice from onSizeChanged, however, I was unable to reproduce this
behavior with log statements.
MozReview-Commit-ID: A5amGqTxv55
--- a/mobile/android/base/java/org/mozilla/gecko/widget/FaviconView.java
+++ b/mobile/android/base/java/org/mozilla/gecko/widget/FaviconView.java
@@ -96,21 +96,16 @@ public class FaviconView extends ImageVi
mBackgroundRect = new RectF(0, 0, 0, 0);
mResources = getResources();
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
- // No point rechecking the image if there hasn't really been any change.
- if (w == oldw && h == oldh) {
- return;
- }
-
mBackgroundRect.right = w;
mBackgroundRect.bottom = h;
formatImage();
}
@Override
public void onDraw(Canvas canvas) {