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

Commit 1bf5329a authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Ajay Panicker
Browse files

Add a missing null pointer check inside AvrcpTargetService.dump()

This fixes NPE when "dumpsys bluetooth_manager"

Bug: 76219543
Test: Manual: adb shell dumpsys bluetooth_manager
Change-Id: Ie39844fb44c424631595444e42bbaccb019b7d3a
(cherry picked from commit 666ea968)
Merged-In: Ie39844fb44c424631595444e42bbaccb019b7d3a
parent 3569072c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -273,7 +273,11 @@ public class AvrcpTargetService extends ProfileService {
     * Dump debugging information to the string builder
     */
    public void dump(StringBuilder sb) {
        if (mMediaPlayerList != null) {
            mMediaPlayerList.dump(sb);
        } else {
            sb.append("\nMedia Player List is empty\n");
        }
    }

    private static class AvrcpTargetBinder extends IBluetoothAvrcpTarget.Stub