private void updateVoiceButton ( boolean empty ) { int visibility = GONE ; if ( mVoiceButtonEnabled && ! isIconified ( ) && empty ) { visibility = VISIBLE ; mSubmitButton . setVisibility ( GONE ) ; } mVoiceButton . setVisibility ( visibility ) ; }
Update the visibility of the voice button . There are actually two voice search modes either of which will activate the button .