Merge "Propagate ephemeral flag from adb install to PackageParser"
This commit is contained in:
committed by
Android (Google) Code Review
commit
7dfe29f010
@@ -703,8 +703,11 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
for (File addedFile : addedFiles) {
|
||||
final ApkLite apk;
|
||||
try {
|
||||
apk = PackageParser.parseApkLite(
|
||||
addedFile, PackageParser.PARSE_COLLECT_CERTIFICATES);
|
||||
int flags = PackageParser.PARSE_COLLECT_CERTIFICATES;
|
||||
if ((params.installFlags & PackageManager.INSTALL_EPHEMERAL) != 0) {
|
||||
flags |= PackageParser.PARSE_IS_EPHEMERAL;
|
||||
}
|
||||
apk = PackageParser.parseApkLite(addedFile, flags);
|
||||
} catch (PackageParserException e) {
|
||||
throw PackageManagerException.from(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user