Increase retention period of staged sessions

The retention period is increased from 7 to 21 days to capture
information about the previous train installation when a rollback occurs
and handle cases where the bug report is taken after a few days of
rollback.

Bug: 208825408
Test: adb shell dumpsys package
Change-Id: I3b0827b59b527fb8a3d0f0b902f85af4ef2c90d4
This commit is contained in:
Sanjana Sunil
2021-12-24 14:45:36 +00:00
parent 4fd2da8af2
commit 4517f1776e

View File

@@ -135,7 +135,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
/** Automatically destroy sessions older than this */
private static final long MAX_AGE_MILLIS = 3 * DateUtils.DAY_IN_MILLIS;
/** Automatically destroy staged sessions that have not changed state in this time */
private static final long MAX_TIME_SINCE_UPDATE_MILLIS = 7 * DateUtils.DAY_IN_MILLIS;
private static final long MAX_TIME_SINCE_UPDATE_MILLIS = 21 * DateUtils.DAY_IN_MILLIS;
/** Upper bound on number of active sessions for a UID that has INSTALL_PACKAGES */
private static final long MAX_ACTIVE_SESSIONS_WITH_PERMISSION = 1024;
/** Upper bound on number of active sessions for a UID without INSTALL_PACKAGES */