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

Commit bb77d47c authored by Daniel Norman's avatar Daniel Norman Committed by Android (Google) Code Review
Browse files

Merge "Cleanup flag "manager_package_monitor_logic_fix"" into main

parents b22a8283 b73b432a
Loading
Loading
Loading
Loading
+10 −21
Original line number Diff line number Diff line
@@ -6647,7 +6647,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
                }
                final AccessibilityUserState userState = mManagerService.getUserStateLocked(userId);

                if (Flags.managerPackageMonitorLogicFix()) {
                if (!doit) {
                    // if we're not handling the stop here, then we only need to know
                    // if any of the force-stopped packages are currently enabled.
@@ -6659,16 +6658,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
                    mManagerService.onUserStateChangedLocked(userState);
                }
                return false;
                } else {
                    // this old logic did not properly indicate when base packageMonitor's routine
                    // should handle stopping the package.
                    if (doit && mManagerService.onPackagesForceStoppedLocked(packages, userState)) {
                        mManagerService.onUserStateChangedLocked(userState);
                        return false;
                    } else {
                        return true;
                    }
                }
            }
        }

+0 −3
Original line number Diff line number Diff line
@@ -1729,7 +1729,6 @@ public class AccessibilityManagerServiceTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_MANAGER_PACKAGE_MONITOR_LOGIC_FIX)
    public void onHandleForceStop_dontDoIt_packageEnabled_returnsTrue() {
        setupShortcutTargetServices();
        AccessibilityUserState userState = mA11yms.getCurrentUserState();
@@ -1752,7 +1751,6 @@ public class AccessibilityManagerServiceTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_MANAGER_PACKAGE_MONITOR_LOGIC_FIX)
    public void onHandleForceStop_doIt_packageEnabled_returnsFalse() {
        setupShortcutTargetServices();
        AccessibilityUserState userState = mA11yms.getCurrentUserState();
@@ -1775,7 +1773,6 @@ public class AccessibilityManagerServiceTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_MANAGER_PACKAGE_MONITOR_LOGIC_FIX)
    public void onHandleForceStop_dontDoIt_packageNotEnabled_returnsFalse() {
        PackageMonitor monitor = spy(mA11yms.getPackageMonitor());
        when(monitor.getChangingUserId()).thenReturn(UserHandle.USER_SYSTEM);