Fix b/11460582: Photos not rendering.
Noticed that in bindPhoto(Drawable),
we weren't always invalidating like we
are in bindPhoto(bitmap). We now are.
Change-Id: Icc90d4671cdc2a1a237917d873e736d254af9065
diff --git a/src/com/android/ex/photo/views/PhotoView.java b/src/com/android/ex/photo/views/PhotoView.java
index 87038a4..8abbcbf 100644
--- a/src/com/android/ex/photo/views/PhotoView.java
+++ b/src/com/android/ex/photo/views/PhotoView.java
@@ -448,6 +448,7 @@
}
public void bindDrawable(Drawable drawable) {
+ boolean changed = false;
if (drawable != null && drawable != mDrawable) {
// Clear previous state.
if (mDrawable != null) {
@@ -462,9 +463,11 @@
// Set a callback?
mDrawable.setCallback(this);
- configureBounds(true);
- invalidate();
+ changed = true;
}
+
+ configureBounds(changed);
+ invalidate();
}
/**