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

Commit 18ffcb29 authored by Achim Thesmann's avatar Achim Thesmann Committed by Automerger Merge Worker
Browse files

Merge "Prevent race condition" into udc-dev am: 0ab1c83c

parents 48347e02 0ab1c83c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1076,12 +1076,13 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
        if (app == null) {
            return;
        }
        if (mBackgroundStartPrivilegesByStartMerged.allowsAny()
                || mIsAllowedBgActivityStartsByBinding) {
        BackgroundStartPrivileges backgroundStartPrivileges =
                getBackgroundStartPrivilegesWithExclusiveToken();
        if (backgroundStartPrivileges.allowsAny()) {
            // if the token is already there it's safe to "re-add it" - we're dealing with
            // a set of Binder objects
            app.addOrUpdateBackgroundStartPrivileges(this,
                    getBackgroundStartPrivilegesWithExclusiveToken());
                    backgroundStartPrivileges);
        } else {
            app.removeBackgroundStartPrivileges(this);
        }