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

Commit bb7aeb01 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Perform null check before updating originating tokens"

parents 022bcda2 655252ed
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -749,9 +749,15 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
                        // There are other callbacks in the queue, let's just update the originating
                        // There are other callbacks in the queue, let's just update the originating
                        // token
                        // token
                        if (mIsAllowedBgActivityStartsByStart) {
                        if (mIsAllowedBgActivityStartsByStart) {
                            // mAppForAllowingBgActivityStartsByStart can be null here for example
                            // if get 2 calls to allowBgActivityStartsOnServiceStart() without a
                            // process attached to this ServiceRecord, so we need to perform a null
                            // check here.
                            if (mAppForAllowingBgActivityStartsByStart != null) {
                                mAppForAllowingBgActivityStartsByStart
                                mAppForAllowingBgActivityStartsByStart
                                        .addOrUpdateAllowBackgroundActivityStartsToken(
                                        .addOrUpdateAllowBackgroundActivityStartsToken(
                                                this, getExclusiveOriginatingToken());
                                                this, getExclusiveOriginatingToken());
                            }
                        } else {
                        } else {
                            Slog.wtf(TAG,
                            Slog.wtf(TAG,
                                    "Service callback to revoke bg activity starts by service "
                                    "Service callback to revoke bg activity starts by service "