From 4517f1776e7b2bbeae947742053f176da52fccc7 Mon Sep 17 00:00:00 2001 From: Sanjana Sunil Date: Fri, 24 Dec 2021 14:45:36 +0000 Subject: [PATCH] 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 --- .../java/com/android/server/pm/PackageInstallerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java index f4740448b8a9c..23bc5117e9cce 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerService.java +++ b/services/core/java/com/android/server/pm/PackageInstallerService.java @@ -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 */