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

Commit c90db46d authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Merge remote-tracking branch 'origin/lineage-15.1' into v1-oreo

parents 818b5202 00b9ec18
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ public final class BluetoothCodecConfig implements Parcelable {
    public static final int CHANNEL_MODE_NONE         = 0;
    public static final int CHANNEL_MODE_MONO         = 0x1 << 0;
    public static final int CHANNEL_MODE_STEREO       = 0x1 << 1;
    public static final int CHANNEL_MODE_DUAL_CHANNEL = 0x1 << 2;

    private final int mCodecType;
    private int mCodecPriority;
+1 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@
        <item>0</item>
        <item>1</item>
        <item>2</item>
        <item>3</item>
    </string-array>

    <!-- Summaries for Bluetooth Audio Codec Channel Mode selection preference. [CHAR LIMIT=50]-->
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright (C) 2018 The LineageOS Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

    <!-- Titles for Bluetooth Audio Codec Channel Mode selection preference. [CHAR LIMIT=50] -->
    <string-array name="lineage_bluetooth_a2dp_codec_channel_mode_titles">
        <item>Use System Selection (Default)</item>
        <item>Mono</item>
        <item>Stereo</item>
        <item>Dual Channel</item>
    </string-array>

    <!-- Summaries for Bluetooth Audio Codec Channel Mode selection preference. [CHAR LIMIT=50]-->
    <string-array name="lineage_bluetooth_a2dp_codec_channel_mode_summaries" >
        <item>Use System Selection (Default)</item>
        <item>Mono</item>
        <item>Stereo</item>
        <item>Dual Channel</item>
    </string-array>

</resources>
+1 −1
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ public class A2dpProfile implements LocalBluetoothProfile {

        final BluetoothCodecConfig codecConfig = (selectable == null || selectable.length < 1)
                ? null : selectable[0];
        final int codecType = (codecConfig == null || codecConfig.isMandatoryCodec())
        final int codecType = (codecConfig == null)
                ? BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID : codecConfig.getCodecType();

        int index = -1;
+3 −1
Original line number Diff line number Diff line
@@ -189,7 +189,9 @@ public class A2dpProfileTest {
        when(status.getCodecsSelectableCapabilities()).thenReturn(configs);

        when(config.isMandatoryCodec()).thenReturn(true);
        assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo(UNKNOWN_CODEC_LABEL);
        when(config.getCodecName()).thenReturn("SBC");
        assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo(
                String.format(KNOWN_CODEC_LABEL, config.getCodecName()));
    }

    @Test