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

Commit bac22cbb authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Skip fast check if home==system

If the home app is set to a process that shares the system UID skip the
fast check and run the full check instead.

Bug: 379836762
Test: atest BackgroundActivityLaunchTest
Flag: EXEMPT bugfix
Change-Id: I856cc3f3db8a93b361b996a4e9f960bf5da6d3d0
parent fb47b4cc
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -288,9 +288,10 @@ public class BackgroundActivityStartController {
    }

    private boolean isHomeApp(int uid, @Nullable String packageName) {
        if (getService().mHomeProcess != null) {
            // Fast check
            return uid == getService().mHomeProcess.mUid;
        WindowProcessController homeProcess = getService().mHomeProcess;
        if (homeProcess != null && (homeProcess.mUid != SYSTEM_UID || packageName == null)) {
            // Fast check (skip if sharing system UID and we have a package name)
            return uid == homeProcess.mUid;
        }
        if (packageName == null) {
            return false;