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

Commit 89feb369 authored by Iván Budnik's avatar Iván Budnik Committed by Cherrypicker Worker
Browse files

Enforce @NonNull package name for onMediaKeyEventSessionChanged

Previously, listeners could receive unexpected null package names.

Test: atest MediaSessionManagerTest
Bug: 274082657
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f8fd9975fba6ca0299b7b31f69422c90412790dd)
Merged-In: I0fdada5ed6d27a02ee0c1ab58423238c7651b5de
Change-Id: I0fdada5ed6d27a02ee0c1ab58423238c7651b5de
parent aee5c182
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ public final class MediaSessionManager {
    private final Map<OnMediaKeyEventSessionChangedListener, Executor>
            mMediaKeyEventSessionChangedCallbacks = new HashMap<>();
    @GuardedBy("mLock")
    private String mCurMediaKeyEventSessionPackage;
    private String mCurMediaKeyEventSessionPackage = "";
    @GuardedBy("mLock")
    private MediaSession.Token mCurMediaKeyEventSession;
    @GuardedBy("mLock")