Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 549ddb5b authored by Ryuki Nakamura's avatar Ryuki Nakamura Committed by android-build-merger
Browse files

Read and apply 'packageName'

am: 5fe91f8d

Change-Id: I49fa46b1b8a43d74a1fa29f551f173da12c37960
parents 76419dda 5fe91f8d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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.");
            }