set button state in onResume, since it is guaranteed to be executed after onactivityresult