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

Commit b05d1329 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27139220']...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27139220'] into sparse-11743918-L09400030003675127.
SPARSE_CHANGE: I5b16c7f6b5c4996ff40e50274c0e968a3f355674

Change-Id: I253cb95966926969ce12458f75ceb7241d6c955c
parents c59cfd9a be9166e3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -671,6 +671,9 @@ public class MediaSessionService extends SystemService implements Monitor {
    }

    private void addUserEngagedSession(MediaSessionRecordImpl mediaSessionRecord) {
        if (!Flags.enableNotifyingActivityManagerWithMediaSessionStatusChange()) {
            return;
        }
        synchronized (mLock) {
            int uid = mediaSessionRecord.getUid();
            mUserEngagedSessionsForFgs.putIfAbsent(uid, new HashSet<>());
@@ -679,6 +682,9 @@ public class MediaSessionService extends SystemService implements Monitor {
    }

    private void removeUserEngagedSession(MediaSessionRecordImpl mediaSessionRecord) {
        if (!Flags.enableNotifyingActivityManagerWithMediaSessionStatusChange()) {
            return;
        }
        synchronized (mLock) {
            int uid = mediaSessionRecord.getUid();
            Set<MediaSessionRecordImpl> mUidUserEngagedSessionsForFgs =