Fix bubble crash when dismiss audio route selector dialog.

When AudioRouteSelectorDialogFragment tries to call
onAudioRouteSelectorDismiss() on its parent AudioRouteSelectorActivity, the parent might already finish,
which causes NPE. We should make sure the fragment is dismissed and removed before the activity finished. We do it when activity onPause because we don't expect it to resume.

Test: AudioRouteSelectorDialogFragmentTest
PiperOrigin-RevId: 167607068
Change-Id: Ifd2efcc92eb45262da2c6441bfac8119799d78f2
2 files changed
tree: a07d7f64ac43aa49c79dbf504a4ae51e4df35451
  1. assets/
  2. java/
  3. Android.mk
  4. AndroidManifest.xml
  5. CONTRIBUTING
  6. LICENSE