Fix for timeout error on Activity.onPause when no network connectivity