spinner dismissed at onpause

Spinner needs to be dismissed on pause to avoid issue with activity window detached before dismiss event finishes. This is happening is some devices.