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

Commit c01c8f02 authored by Gabriele M's avatar Gabriele M Committed by Dan Pasanen
Browse files

AVRCP: Add null pointer check

If mMediaController is null, process the request as it was done
before commit cde13b0d
("AVRCP: Update proper track number and media number")

Change-Id: Iaffc5a8a534d4dfb0e4670bf5bfefa6afe5bd655
parent d484cab1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3575,7 +3575,7 @@ public final class Avrcp {
                attrs[i] == MEDIA_ATTR_NUM_TRACKS)
                cachereq = true;
        }
        if (scope == SCOPE_NOW_PLAYING && cachereq) {
        if (mMediaController != null && scope == SCOPE_NOW_PLAYING && cachereq) {
            Log.v(TAG,"scope now playing, caching req");
            mMediaController.getTransportControls().getRemoteControlClientNowPlayingEntries();
            mCachedRequest = new CachedRequest((long)0, (long)0, numAttr, attrs, size, false,