am 373f2c68: am eb6f9c08: Merge change I0ad3fc43 into eclair

Merge commit '373f2c68131fada39948ecc4c1dd9770b5d0e856' into eclair-mr2-plus-aosp

* commit '373f2c68131fada39948ecc4c1dd9770b5d0e856':
  Avoid IAE by only dismissing dialog when still attached.