make DraweeHolder's isControllerValid method public
@@ -245,6 +245,14 @@ public class DraweeHolder<DH extends DraweeHierarchy>
return mHierarchy == null ? null : mHierarchy.getTopLevelDrawable();
}
+ /**
+ * Returns whether currently set controller is valid: not null and attached to the hierarchy that
+ * is held by the holder
+ */
+ public boolean isControllerValid() {
+ return mController != null && mController.getHierarchy() == mHierarchy;
+ }
+
protected DraweeEventTracker getDraweeEventTracker() {
return mEventTracker;
}
@@ -289,8 +297,4 @@ public class DraweeHolder<DH extends DraweeHierarchy>
.add("events", mEventTracker.toString())
.toString();
}
-
- private boolean isControllerValid() {
- return mController != null && mController.getHierarchy() == mHierarchy;
- }
}
