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

Commit eb3c0525 authored by Santiago Seifert's avatar Santiago Seifert Committed by Gerrit Code Review
Browse files

Merge "Fix NPE when controller has no set package name" into main

parents 9ad37a9a 6a62fe4e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.bluetooth.audio_util;

import android.content.Context;
import android.os.Looper;
import android.text.TextUtils;

import com.android.internal.annotations.VisibleForTesting;

@@ -37,7 +38,7 @@ public final class MediaPlayerWrapperFactory {
        }

        MediaPlayerWrapper newWrapper;
        if (controller.getPackageName().equals("com.google.android.music")) {
        if (TextUtils.equals(controller.getPackageName(), "com.google.android.music")) {
            newWrapper = new GPMWrapper(context, controller, looper);
        } else {
            newWrapper = new MediaPlayerWrapper(context, controller, looper);