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

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

Add more checks to isFilterStopped

A system app is considered as stopped only if it was initially scanned
in the stopped state (during first boot). For all other cases, a stopped
system app should not be considered as stopped, while resolving intents

Bug: 295084647
Bug: 297788394
Bug: 294330522
Bug: 296180087
Bug: 297360102
Test: manual.
Test: Follow repro steps in b/294330522
Change-Id: I21a121cae542a1381361ffec5715a6fab8040379
parent e1aa484c
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -943,6 +943,12 @@ public class ComponentResolver extends ComponentResolverLocked implements
                return false;
                return false;
            }
            }


            if (packageState.isSystem()) {
                // A system app can be considered in the stopped state only if it was originally
                // scanned in the stopped state.
                return packageState.isScannedAsStoppedSystemApp() &&
                    packageState.getUserStateOrDefault(userId).isStopped();
            }
            return packageState.getUserStateOrDefault(userId).isStopped();
            return packageState.getUserStateOrDefault(userId).isStopped();
        }
        }
    }
    }