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

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

Snap for 8485725 from fa7a761f to tm-qpr1-release

Change-Id: Ieae29be7b76a95358631e5569f18b9a46f8b55f7
parents 6aabbff6 fa7a761f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,8 +23,8 @@
    <string name="bt_share_picker_label" msgid="7464438494743777696">"Bluetooth"</string>
    <string name="unknown_device" msgid="2317679521750821654">"Dispositivo desconocido"</string>
    <string name="unknownNumber" msgid="1245183329830158661">"Desconocido"</string>
    <string name="airplane_error_title" msgid="2570111716678850860">"Modo avión"</string>
    <string name="airplane_error_msg" msgid="4853111123699559578">"No puedes utilizar el Bluetooth en el modo avión."</string>
    <string name="airplane_error_title" msgid="2570111716678850860">"Modo Avión"</string>
    <string name="airplane_error_msg" msgid="4853111123699559578">"No puedes utilizar el Bluetooth en el modo Avión."</string>
    <string name="bt_enable_title" msgid="4484289159118416315"></string>
    <string name="bt_enable_line1" msgid="8429910585843481489">"Para utilizar los servicios de Bluetooth, primero debes activar la función Bluetooth."</string>
    <string name="bt_enable_line2" msgid="1466367120348920892">"¿Quieres activar la función Bluetooth ahora?"</string>
+9 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.btservice.ServiceFactory;
import com.android.bluetooth.btservice.storage.DatabaseManager;
import com.android.bluetooth.hfp.HeadsetService;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.modules.utils.SynchronousResultReceiver;
@@ -409,6 +410,14 @@ public class A2dpService extends ProfileService {
            return false;
        } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN
                && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) {
            if (!isOutgoingRequest) {
                HeadsetService headsetService = HeadsetService.getHeadsetService();
                if (headsetService != null && headsetService.okToAcceptConnection(device, true)) {
                    Log.d(TAG, "okToConnect: Fallback connection to allowed HFP profile");
                    headsetService.connect(device);
                    return true;
                }
            }
            // Otherwise, reject the connection if connectionPolicy is not valid.
            Log.w(TAG, "okToConnect: return false, connectionPolicy=" + connectionPolicy);
            return false;
+10 −1
Original line number Diff line number Diff line
@@ -196,7 +196,16 @@ public class MediaPlayerList {

                // If there were any active players and we don't already have one due to the Media
                // Framework Callbacks then set the highest priority one to active
                if (mActivePlayerId == 0 && mMediaPlayers.size() > 0) setActivePlayer(1);
                if (mActivePlayerId == 0 && mMediaPlayers.size() > 0) {
                    String packageName = mMediaSessionManager.getMediaKeyEventSessionPackageName();
                    if (!TextUtils.isEmpty(packageName) && haveMediaPlayer(packageName)) {
                        Log.i(TAG, "Set active player to MediaKeyEvent session = " + packageName);
                        setActivePlayer(mMediaPlayerIds.get(packageName));
                    } else {
                        Log.i(TAG, "Set active player to first default");
                        setActivePlayer(1);
                    }
                }
            });
    }

+2 −2
Original line number Diff line number Diff line
@@ -384,10 +384,10 @@ public class AvrcpTargetService extends ProfileService {

    String getCurrentMediaId() {
        String id = mMediaPlayerList.getCurrentMediaId();
        if (id != null) return id;
        if (id != null && !id.isEmpty()) return id;

        Metadata song = getCurrentSongInfo();
        if (song != null) return song.mediaId;
        if (song != null && !song.mediaId.isEmpty()) return song.mediaId;

        // We always want to return something, the error string just makes debugging easier
        return "error";
+4 −0
Original line number Diff line number Diff line
@@ -736,6 +736,10 @@ public class AdapterService extends Service {
            nonSupportedProfiles.add(BassClientService.class);
        }

        if (isLeAudioBroadcastSourceSupported()) {
            Config.addSupportedProfile(BluetoothProfile.LE_AUDIO_BROADCAST);
        }

        if (!nonSupportedProfiles.isEmpty()) {
            // Remove non-supported profiles from the supported list
            // since the controller doesn't support
Loading