Loading src/com/android/packageinstaller/InstallAppProgress.java +4 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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."); } Loading Loading
src/com/android/packageinstaller/InstallAppProgress.java +4 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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."); } Loading