Read and apply 'packageName'

Bug: 30056625
Change-Id: Ie8e46fc7a2c340fb04b64feb331af0d882fe9672
diff --git a/src/com/android/packageinstaller/InstallAppProgress.java b/src/com/android/packageinstaller/InstallAppProgress.java
index a2bbfc0..92594e3 100755
--- a/src/com/android/packageinstaller/InstallAppProgress.java
+++ b/src/com/android/packageinstaller/InstallAppProgress.java
@@ -35,6 +35,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.PackageParser;
+import android.content.pm.PackageParser.PackageLite;
 import android.content.pm.ResolveInfo;
 import android.net.Uri;
 import android.os.Bundle;
@@ -356,7 +357,9 @@
 
             File file = new File(mPackageURI.getPath());
             try {
-                params.setInstallLocation(PackageParser.parsePackageLite(file, 0).installLocation);
+                PackageLite pkg = PackageParser.parsePackageLite(file, 0);
+                params.sessionParams.setAppPackageName(pkg.packageName);
+                params.setInstallLocation(pkg.installLocation);
             } catch (PackageParser.PackageParserException e) {
                 Log.e(TAG, "Cannot parse package " + file + ". Assuming defaults.");
             }