I have my dialog based on AlertDialog. When screen rotates (or some other config change happens), the dialog is closed by OS.
Problem is that my dialog plays audio by MediaPlayer, and when such auto-close happens, dialog is gone but sound continues to play.
Does Dialog get some chance to cleanup before it's killed by system? Or I'm forced to use Activity in this case?