Fix an exception in PackageInstaller

It is apparently possible for an activity to get
a configuration change callback when its view is
no longer attached to the window manager. Check
if a view is attached before removing it from the
window manager.

bug:30389560

Change-Id: I384401742eca61d140c7590eb5c67150a15da83b
1 file changed