requests the task to be canceled . concode_field_sep Cancelable<?> mCurrentTask concode_elem_sep int mState concode_elem_sep T mResult concode_elem_sep int STATE_CANCELED concode_elem_sep int STATE_INITIAL concode_elem_sep int STATE_EXECUTING concode_elem_sep int STATE_ERROR concode_elem_sep Throwable mError concode_elem_sep Thread mThread concode_elem_sep int STATE_CANCELING concode_elem_sep int STATE_COMPLETE concode_field_sep boolean isInStates concode_elem_sep T handleTerminalStates concode_elem_sep T get concode_elem_sep void freeCanceledResult concode_elem_sep void await concode_elem_sep boolean isCanceling concode_elem_sep T execute concode_elem_sep void interruptNow concode_elem_sep T runSubTask
boolean function ( ) { if ( mState == STATE_INITIAL ) { mState = STATE_CANCELED ; notifyAll ( ) ; return false ; } if ( mState == STATE_EXECUTING ) { if ( mCurrentTask != null ) mCurrentTask . requestCancel ( ) ; mState = STATE_CANCELING ; return true ; } return false ; }