code: private boolean doOnFocus(boolean focused) {
          if (!mFocusEnabled) {
              return false;
          }
  
          final boolean oldFocus = mIsFocused;
  
          Log.v(Log.SUBSYSTEM.WIDGET, TAG, "doOnFocus(%s): mIsFocused: %b, focused: %b", getName(),
                  mIsFocused, focused);
  
  
          final List<OnFocusListener> focusListeners;
          synchronized (mFocusListeners) {
              focusListeners = new ArrayList<>(mFocusListeners);
          }
  
          for (OnFocusListener listener : focusListeners) {
              if (listener.onFocus(this, focused)) {
                  return true;
              }
          }
          final boolean tookFocus = onFocus(focused);
          Log.d(Log.SUBSYSTEM.WIDGET, TAG, "doOnFocus(%s): tookFocus: %b", getName(), tookFocus);
          // onFocus() can refuse to take focus, but when we lose focus, we don't get a choice about it
          mIsFocused = focused && tookFocus;
  
          updateState();
          if (oldFocus != mIsFocused) {
              final boolean inFollowFocusGroup = isInFollowFocusGroup();
              for (Widget child : getChildren()) {
                  if (child.mFocusEnabled
                          && child.isFocused() != focused
                          && (mChildrenFollowFocus || child.mFollowParentFocus || inFollowFocusGroup)) {
                      child.doOnFocus(mIsFocused);
                  }
              }
          }
          return tookFocus;
      }
docs: Called when this {@link Widget} gains line-of-sight focus. Notifies all
  {@linkplain OnFocusListener#onFocus(boolean) listeners}; if none of the
  listeners has completely handled the event, {@link #onFocus(boolean)} is
  called.
  
  @param focused {@code True} if the {@link Widget} can gain focus, {@code false} if it has
  lost focus.
  @return {@code True} if the {@link Widget} accepted focus, {@code false} otherwise.