code: public void updateDrawableState(int state, boolean flag) {
          final int oldState = mCombinedState;
          // Update the combined state flag
          if (flag) mCombinedState |= state;
          else mCombinedState &= ~state;
  
          // Set the combined state
          if (oldState != mCombinedState) {
              setState(VIEW_STATE_SETS[mCombinedState]);
          }
      }
docs: Either remove or add a state to the combined state.
  
  @param state State to add or remove.
  @param flag  True to add, false to remove.