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

Commit a7f4fde9 authored by Harshit Mahajan's avatar Harshit Mahajan
Browse files

Remove unused mitigation results

Removing the one's we anticipated will be used but not used currently.
We will be adding them as and when required.

Bug: 377635591
Test: TH
Flag: android.crashrecovery.flags.enable_crashrecovery
Change-Id: I0a21c7746bd8867d76b33e058cfac4975b1f3b97
parent 06bf614f
Loading
Loading
Loading
Loading
+0 −41
Original line number Diff line number Diff line
@@ -766,14 +766,6 @@ public class PackageWatchdog {
        return mPackagesExemptFromImpactLevelThreshold;
    }

    /**
     * Indicates that the result of a mitigation executed during
     * {@link PackageHealthObserver#onExecuteHealthCheckMitigation} or
     * {@link PackageHealthObserver#onExecuteBootLoopMitigation} is unknown.
     */
    public static final int MITIGATION_RESULT_UNKNOWN =
            ObserverMitigationResult.MITIGATION_RESULT_UNKNOWN;

    /**
     * Indicates that a mitigation was successfully triggered or executed during
     * {@link PackageHealthObserver#onExecuteHealthCheckMitigation} or
@@ -790,23 +782,6 @@ public class PackageWatchdog {
    public static final int MITIGATION_RESULT_SKIPPED =
            ObserverMitigationResult.MITIGATION_RESULT_SKIPPED;

    /**
     * Indicates that a mitigation executed during
     * {@link PackageHealthObserver#onExecuteHealthCheckMitigation} or
     * {@link PackageHealthObserver#onExecuteBootLoopMitigation} failed,
     * but the failure is potentially retryable.
     */
    public static final int MITIGATION_RESULT_FAILURE_RETRYABLE =
            ObserverMitigationResult.MITIGATION_RESULT_FAILURE_RETRYABLE;

    /**
     * Indicates that a mitigation executed during
     * {@link PackageHealthObserver#onExecuteHealthCheckMitigation} or
     * {@link PackageHealthObserver#onExecuteBootLoopMitigation} failed,
     * and the failure is not retryable.
     */
    public static final int MITIGATION_RESULT_FAILURE_NON_RETRYABLE =
            ObserverMitigationResult.MITIGATION_RESULT_FAILURE_NON_RETRYABLE;

    /**
     * Possible return values of the for mitigations executed during
@@ -816,18 +791,12 @@ public class PackageWatchdog {
     */
    @Retention(SOURCE)
    @IntDef(prefix = "MITIGATION_RESULT_", value = {
            ObserverMitigationResult.MITIGATION_RESULT_UNKNOWN,
            ObserverMitigationResult.MITIGATION_RESULT_SUCCESS,
            ObserverMitigationResult.MITIGATION_RESULT_SKIPPED,
            ObserverMitigationResult.MITIGATION_RESULT_FAILURE_RETRYABLE,
            ObserverMitigationResult.MITIGATION_RESULT_FAILURE_NON_RETRYABLE,
            })
    public @interface ObserverMitigationResult {
        int MITIGATION_RESULT_UNKNOWN = 0;
        int MITIGATION_RESULT_SUCCESS = 1;
        int MITIGATION_RESULT_SKIPPED = 2;
        int MITIGATION_RESULT_FAILURE_RETRYABLE = 3;
        int MITIGATION_RESULT_FAILURE_NON_RETRYABLE = 4;
    }

    /**
@@ -921,11 +890,6 @@ public class PackageWatchdog {
         * @param mitigationCount the number of times mitigation has been called for this package
         *                         (including this time).
         * @return {@link #MITIGATION_RESULT_SUCCESS} if the mitigation was successful,
         *         {@link #MITIGATION_RESULT_FAILURE_RETRYABLE} if the mitigation failed but can be
         *         retried,
         *         {@link #MITIGATION_RESULT_FAILURE_NON_RETRYABLE} if the mitigation failed and
         *         cannot be retried,
         *         {@link #MITIGATION_RESULT_UNKNOWN} if the result of the mitigation is unknown,
         *         or {@link #MITIGATION_RESULT_SKIPPED} if the mitigation was skipped.
         */
        @ObserverMitigationResult int onExecuteHealthCheckMitigation(
@@ -957,11 +921,6 @@ public class PackageWatchdog {
         *                        boot loop (including this time).
         *
         * @return {@link #MITIGATION_RESULT_SUCCESS} if the mitigation was successful,
         *         {@link #MITIGATION_RESULT_FAILURE_RETRYABLE} if the mitigation failed but can be
         *         retried,
         *         {@link #MITIGATION_RESULT_FAILURE_NON_RETRYABLE} if the mitigation failed and
         *         cannot be retried,
         *         {@link #MITIGATION_RESULT_UNKNOWN} if the result of the mitigation is unknown,
         *         or {@link #MITIGATION_RESULT_SKIPPED} if the mitigation was skipped.
         */
        default @ObserverMitigationResult int onExecuteBootLoopMitigation(int mitigationCount) {