@Override
  public void setHierarchy(@Nullable DraweeHierarchy hierarchy) {
    if (FLog.isLoggable(FLog.VERBOSE)) {
      FLog.v(
          // NULLSAFE_FIXME[Parameter Not Nullable]
          TAG, "controller %x %s: setHierarchy: %s", System.identityHashCode(this), mId, hierarchy);
    }
    mEventTracker.recordEvent(
        (hierarchy != null) ? Event.ON_SET_HIERARCHY : Event.ON_CLEAR_HIERARCHY);
    // force release in case request was submitted
    if (mIsRequestSubmitted) {
      mDeferredReleaser.cancelDeferredRelease(this);
      release();
    }
    // clear the existing hierarchy
    if (mSettableDraweeHierarchy != null) {
      // NULLSAFE_FIXME[Parameter Not Nullable]
      mSettableDraweeHierarchy.setControllerOverlay(null);
      mSettableDraweeHierarchy = null;
    }
    // set the new hierarchy
    if (hierarchy != null) {
      Preconditions.checkArgument(hierarchy instanceof SettableDraweeHierarchy);
      mSettableDraweeHierarchy = (SettableDraweeHierarchy) hierarchy;
      // NULLSAFE_FIXME[Parameter Not Nullable]
      mSettableDraweeHierarchy.setControllerOverlay(mControllerOverlay);
    }

    if (mLegacyOnFadeListener != null) {
      setUpLoggingListener();
    }
  }
Sets the hierarchy.

<p>The controller should be detached when this method is called.

@param hierarchy This must be an instance of {@link SettableDraweeHierarchy}
drawee/src/main/java/com/facebook/drawee/controller/AbstractDraweeController.java