I think you would have been better off with this being onEndPause instead of being a toggle.  It would make your code here and later a little simpler.