void setState ( final WidgetState . State state ) { Log . d ( TAG , "setState(%s): state is %s, setting to %s" , mWidget . getName ( ) , mState , state ) ; if ( state != mState ) { final WidgetState . State nextState = getNextState ( state ) ; Log . d ( TAG , "setState(%s): next state '%s'" , mWidget . getName ( ) , nextState ) ; if ( nextState != mState ) { Log . d ( TAG , "setState(%s): setting state to '%s'" , mWidget . getName ( ) , nextState ) ; setCurrentState ( false ) ; mState = nextState ; setCurrentState ( true ) ; } } }
Sets current state