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

Commit 34c8f6ed authored by Alyssa Ketpreechasawat's avatar Alyssa Ketpreechasawat Committed by Android (Google) Code Review
Browse files

Merge "Extend rollback life time duration from 14 days to 60 days." into main

parents b0dac768 7bf91cc3
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;