Remove #updateStoredSession (6/n)

Per offline discussion, the mapping between id and session object won't
change over time. There is no need to update the mapping again.

Bug: 167996901
Test: atest StagedInstallTest StagedInstallInternalTest
Change-Id: I24c0d648358d6ffab36a89598c297bdf4f62156e
This commit is contained in:
JW Wang
2020-09-10 11:32:31 +08:00
parent 385fea4455
commit 3792c8cb46

View File

@@ -164,17 +164,6 @@ public class StagingManager {
}
}
private void updateStoredSession(@NonNull PackageInstallerSession sessionInfo) {
synchronized (mStagedSessions) {
PackageInstallerSession storedSession = mStagedSessions.get(sessionInfo.sessionId);
// storedSession might be null if a call to abortSession was made before the session
// is updated.
if (storedSession != null) {
mStagedSessions.put(sessionInfo.sessionId, sessionInfo);
}
}
}
private void markBootCompleted() {
mApexManager.markBootCompleted();
}
@@ -865,7 +854,6 @@ public class StagingManager {
}
void commitSession(@NonNull PackageInstallerSession session) {
updateStoredSession(session);
mPreRebootVerificationHandler.startPreRebootVerification(session);
}