summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuki Nakamura <ryuki.x.nakamura@sonymobile.com>2016-07-13 19:14:17 +0900
committerPhilip P. Moltmann <moltmann@google.com>2016-08-31 18:45:33 +0000
commit5fe91f8d06533ac37da8d334b36565b7d711541d (patch)
treeefa025a03fd6bee751ba8a47d4614ffee11dbafa
parenta0649f3e7417845089157d4e67a4c637d68476cd (diff)
downloadandroid_packages_apps_PackageInstaller-5fe91f8d06533ac37da8d334b36565b7d711541d.tar.gz
android_packages_apps_PackageInstaller-5fe91f8d06533ac37da8d334b36565b7d711541d.tar.bz2
android_packages_apps_PackageInstaller-5fe91f8d06533ac37da8d334b36565b7d711541d.zip
Read and apply 'packageName'
Bug: 30056625 Change-Id: Ie8e46fc7a2c340fb04b64feb331af0d882fe9672
-rwxr-xr-xsrc/com/android/packageinstaller/InstallAppProgress.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/packageinstaller/InstallAppProgress.java b/src/com/android/packageinstaller/InstallAppProgress.java
index a2bbfc0c..92594e35 100755
--- a/src/com/android/packageinstaller/InstallAppProgress.java
+++ b/src/com/android/packageinstaller/InstallAppProgress.java
@@ -35,6 +35,7 @@ import android.content.pm.PackageInstaller;
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 @@ public class InstallAppProgress extends Activity implements View.OnClickListener
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.");
}