Fix anr when installing package

Test: Backport from AOSP
Fixes: 172829519
Change-Id: I02dba3a8f290c2cd8eb43062156f03302955ed06
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
index 4f85eea..bbc33c3 100755
--- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
@@ -339,6 +339,10 @@
             try {
                 session = getPackageManager().getPackageInstaller().openSession(mSessionId);
             } catch (IOException e) {
+                synchronized (this) {
+                    isDone = true;
+                    notifyAll();
+                }
                 return null;
             }