Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bf91cc3 authored by Alyssa Ketpreechasawat's avatar Alyssa Ketpreechasawat
Browse files

Extend rollback life time duration from 14 days to 60 days.

The rollback life time duration will be retained for 60 days for adb/server
side-triggering. The on device automatic rollback is now controlled by
different parameter (see ag/33292131).

Test: presubmit
Bug: 416259905
Flag: android.crashrecovery.flags.extend_rollback_lifetime
Change-Id: I10f449f1700c376e29c94768acb289f0e9871b13
parent 435b88b0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -46,3 +46,10 @@ flag {
    description: "Makes reboot and factory reset synchronous in RescueParty"
    bug: "328203835"
}

flag {
    name: "extend_rollback_lifetime"
    namespace: "modularization"
    description: "Increase rollback lifetime on RollbackManagerService from 14 days to 60 days"
    bug: "416259905"
}
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.server.rollback;

import static android.crashrecovery.flags.Flags.extendRollbackLifetime;

import android.Manifest;
import android.annotation.AnyThread;
import android.annotation.NonNull;
@@ -134,7 +136,7 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub implements Rollba

    // Rollbacks expire after 14 days.
    private static final long DEFAULT_ROLLBACK_LIFETIME_DURATION_MILLIS =
            TimeUnit.DAYS.toMillis(14);
            extendRollbackLifetime() ? TimeUnit.DAYS.toMillis(60) : TimeUnit.DAYS.toMillis(14);

    // Accessed on the handler thread only.
    private long mRollbackLifetimeDurationInMillis = DEFAULT_ROLLBACK_LIFETIME_DURATION_MILLIS;