diff options
| -rw-r--r-- | services/core/java/com/android/server/pm/PackageInstallerService.java | 4 | ||||
| -rw-r--r-- | services/core/java/com/android/server/pm/PackageInstallerSession.java | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java index 6331dd46c035..b1c38d1ebed4 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerService.java +++ b/services/core/java/com/android/server/pm/PackageInstallerService.java @@ -400,10 +400,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements } finally { IoUtils.closeQuietly(fis); } - // After all of the sessions were loaded, they are ready to be sealed and validated + // Re-sealing the sealed sessions. for (int i = 0; i < mSessions.size(); ++i) { PackageInstallerSession session = mSessions.valueAt(i); - session.sealAndValidateIfNecessary(); + session.sealIfNecessary(); } } diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java index 165bdebe070f..71555c98f9d2 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerSession.java +++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java @@ -1374,15 +1374,13 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } /** - * If session should be sealed, then it's sealed to prevent further modification - * and then it's validated. - * - * If the session was sealed but something went wrong then it's destroyed. + * If session should be sealed, then it's sealed to prevent further modification. + * If the session can't be sealed then it's destroyed. * * <p> This is meant to be called after all of the sessions are loaded and added to * PackageInstallerService */ - void sealAndValidateIfNecessary() { + void sealIfNecessary() { synchronized (mLock) { if (!mShouldBeSealed || isStagedAndInTerminalState()) { return; @@ -1391,9 +1389,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { List<PackageInstallerSession> childSessions = getChildSessions(); synchronized (mLock) { try { - sealAndValidateLocked(childSessions); - } catch (StreamingException e) { - Slog.e(TAG, "Streaming failed", e); + sealLocked(childSessions); } catch (PackageManagerException e) { Slog.e(TAG, "Package not valid", e); } |