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

Commit 89f35269 authored by Michal Karpinski's avatar Michal Karpinski Committed by android-build-merger
Browse files

Merge "Remember the process that token was added for also for the services...

Merge "Remember the process that token was added for also for the services that are already running" into qt-dev am: b112f3f6
am: f29eccc2

Change-Id: Ic9a2a62990f645e511bbc85e318c84b0e3f0fc7d
parents 718b50f2 f29eccc2
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -551,12 +551,10 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
                            .removeAllowBackgroundActivityStartsToken(this);
                            .removeAllowBackgroundActivityStartsToken(this);
                    ams.mHandler.removeCallbacks(mStartedWhitelistingBgActivityStartsCleanUp);
                    ams.mHandler.removeCallbacks(mStartedWhitelistingBgActivityStartsCleanUp);
                }
                }
                mAppForStartedWhitelistingBgActivityStarts = null;
            }
            }
            if (mHasStartedWhitelistingBgActivityStarts) {
            // Make sure the cleanup callback knows about the new process.
            // Make sure the cleanup callback knows about the new process.
                mAppForStartedWhitelistingBgActivityStarts = _proc;
            mAppForStartedWhitelistingBgActivityStarts = mHasStartedWhitelistingBgActivityStarts
            }
                    ? _proc : null;
            if (mHasStartedWhitelistingBgActivityStarts
            if (mHasStartedWhitelistingBgActivityStarts
                    || mHasBindingWhitelistingBgActivityStarts) {
                    || mHasBindingWhitelistingBgActivityStarts) {
                _proc.addAllowBackgroundActivityStartsToken(this);
                _proc.addAllowBackgroundActivityStartsToken(this);
@@ -656,6 +654,9 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
     */
     */
    void whitelistBgActivityStartsOnServiceStart() {
    void whitelistBgActivityStartsOnServiceStart() {
        setHasStartedWhitelistingBgActivityStarts(true);
        setHasStartedWhitelistingBgActivityStarts(true);
        if (app != null) {
            mAppForStartedWhitelistingBgActivityStarts = app;
        }


        // This callback is stateless, so we create it once when we first need it.
        // This callback is stateless, so we create it once when we first need it.
        if (mStartedWhitelistingBgActivityStartsCleanUp == null) {
        if (mStartedWhitelistingBgActivityStartsCleanUp == null) {