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

Commit 8a2de1b9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Rollback package after reboot has been performed" into udc-dev am: 81530e99

parents 9e64640e 81530e99
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -580,6 +580,7 @@ public class PackageWatchdog {
                     PackageHealthObserverImpact.USER_IMPACT_LEVEL_10,
                     PackageHealthObserverImpact.USER_IMPACT_LEVEL_30,
                     PackageHealthObserverImpact.USER_IMPACT_LEVEL_50,
                     PackageHealthObserverImpact.USER_IMPACT_LEVEL_60,
                     PackageHealthObserverImpact.USER_IMPACT_LEVEL_70,
                     PackageHealthObserverImpact.USER_IMPACT_LEVEL_100})
    public @interface PackageHealthObserverImpact {
@@ -590,6 +591,7 @@ public class PackageWatchdog {
        /* Actions having medium user impact, user of a device will likely notice. */
        int USER_IMPACT_LEVEL_30 = 30;
        int USER_IMPACT_LEVEL_50 = 50;
        int USER_IMPACT_LEVEL_60 = 60;
        int USER_IMPACT_LEVEL_70 = 70;
        /* Action has high user impact, a last resort, user of a device will be very frustrated. */
        int USER_IMPACT_LEVEL_100 = 100;
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ final class RollbackPackageHealthObserver implements PackageHealthObserver {
            impact = PackageHealthObserverImpact.USER_IMPACT_LEVEL_30;
        } else if (getAvailableRollback(failedPackage) != null) {
            // Rollback is available, we may get a callback into #execute
            impact = PackageHealthObserverImpact.USER_IMPACT_LEVEL_30;
            impact = PackageHealthObserverImpact.USER_IMPACT_LEVEL_60;
        } else if (anyRollbackAvailable) {
            // If any rollbacks are available, we will commit them
            impact = PackageHealthObserverImpact.USER_IMPACT_LEVEL_70;
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ public class RollbackPackageHealthObserverTest {
                observer.onHealthCheckFailed(null,
                        PackageWatchdog.FAILURE_REASON_NATIVE_CRASH, 1));
        // non-native crash for the package
        assertEquals(PackageWatchdog.PackageHealthObserverImpact.USER_IMPACT_LEVEL_30,
        assertEquals(PackageWatchdog.PackageHealthObserverImpact.USER_IMPACT_LEVEL_60,
                observer.onHealthCheckFailed(testFailedPackage,
                        PackageWatchdog.FAILURE_REASON_APP_CRASH, 1));
        // non-native crash for a different package