fix android wanting to dispatch afui:ready event while other code is executing