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

Commit c49d524b authored by Mårten Kongstad's avatar Mårten Kongstad Committed by Todd Kennedy
Browse files

Fix broken test case 'testOverlayInfoStateTransitions'

Commit e0b984e8 "Diff overlays between PackageManagerService and
OverlayManagerService" removed the OverlayInfo.STATE_TARGET_UPGRADING
state. Update the OverlayManagerServiceImplTests tests accordingly.

Bug: 130257545
Test: atest 'com.android.server.om.OverlayManagerServiceImplTests#testOverlayInfoStateTransitions'
Change-Id: I06fed8cfe4daf0206843d140ae7ab594cc89ab09
parent 35e7fa1b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -45,8 +45,7 @@ public final class OverlayInfo implements Parcelable {
            STATE_DISABLED,
            STATE_ENABLED,
            STATE_ENABLED_STATIC,
            // @Deprecated STATE_TARGET_UPGRADING,
            STATE_TARGET_IS_BEING_REPLACED,
            // @Deprecated STATE_TARGET_IS_BEING_REPLACED,
            STATE_OVERLAY_IS_BEING_REPLACED,
    })
    /** @hide */
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.server.om;
import static android.content.om.OverlayInfo.STATE_DISABLED;
import static android.content.om.OverlayInfo.STATE_ENABLED;
import static android.content.om.OverlayInfo.STATE_MISSING_TARGET;
import static android.content.om.OverlayInfo.STATE_TARGET_IS_BEING_REPLACED;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -172,8 +171,9 @@ public class OverlayManagerServiceImplTests {
        mImpl.setEnabled(OVERLAY, true, USER);
        assertState(STATE_ENABLED, OVERLAY, USER);

        // target upgrades do not change the state of the overlay
        beginUpgradeTargetPackage(TARGET, USER);
        assertState(STATE_TARGET_IS_BEING_REPLACED, OVERLAY, USER);
        assertState(STATE_ENABLED, OVERLAY, USER);

        endUpgradeTargetPackage(TARGET, USER);
        assertState(STATE_ENABLED, OVERLAY, USER);