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

Commit e64e8ea2 authored by Sumedh Sen's avatar Sumedh Sen
Browse files

Fix filtering logic for stopped packages

System apps can also be in a stopped state, per b/249514169. As such,
while checking if a package is stopped for a user, skip checking if its
not a system package.

Bug: 249514169
Test: atest CtsContentTestCases:SystemPackageDefaultStoppedStateTest
Change-Id: Ib64f3b62cb8a3e1d580d55bfdcd904e52103d394
parent 05d3f055
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -943,11 +943,7 @@ public class ComponentResolver extends ComponentResolverLocked implements
                return false;
            }

            // System apps are never considered stopped for purposes of
            // filtering, because there may be no way for the user to
            // actually re-launch them.
            return !packageState.isSystem()
                    && packageState.getUserStateOrDefault(userId).isStopped();
            return packageState.getUserStateOrDefault(userId).isStopped();
        }
    }