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

Commit 810b6607 authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge "Add system properties to config audio codec priority" am: 0a43ce3b...

Merge "Add system properties to config audio codec priority" am: 0a43ce3b am: 43327b59 am: 811f5393 am: 17ee20cb am: 8b622bb1

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2455512



Change-Id: Idaf1cd9b0ca650d5d2da502f44ff0ee3d0ea1078
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 39874fb5 8b622bb1
Loading
Loading
Loading
Loading
+19 −6
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.media.AudioManager;
import android.os.SystemProperties;
import android.util.Log;

import com.android.bluetooth.R;
@@ -186,7 +187,9 @@ class A2dpCodecConfig {

        int value;
        try {
            value = resources.getInteger(R.integer.a2dp_source_codec_priority_sbc);
            value = SystemProperties.getInt(
                "bluetooth.a2dp.source.sbc_priority.config",
                resources.getInteger(R.integer.a2dp_source_codec_priority_sbc));
        } catch (NotFoundException e) {
            value = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
        }
@@ -196,7 +199,9 @@ class A2dpCodecConfig {
        }

        try {
            value = resources.getInteger(R.integer.a2dp_source_codec_priority_aac);
            value = SystemProperties.getInt(
                "bluetooth.a2dp.source.aac_priority.config",
                resources.getInteger(R.integer.a2dp_source_codec_priority_aac));
        } catch (NotFoundException e) {
            value = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
        }
@@ -206,7 +211,9 @@ class A2dpCodecConfig {
        }

        try {
            value = resources.getInteger(R.integer.a2dp_source_codec_priority_aptx);
            value = SystemProperties.getInt(
                "bluetooth.a2dp.source.aptx_priority.config",
                resources.getInteger(R.integer.a2dp_source_codec_priority_aptx));
        } catch (NotFoundException e) {
            value = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
        }
@@ -216,7 +223,9 @@ class A2dpCodecConfig {
        }

        try {
            value = resources.getInteger(R.integer.a2dp_source_codec_priority_aptx_hd);
            value = SystemProperties.getInt(
                "bluetooth.a2dp.source.aptx_hd_priority.config",
                resources.getInteger(R.integer.a2dp_source_codec_priority_aptx_hd));
        } catch (NotFoundException e) {
            value = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
        }
@@ -226,7 +235,9 @@ class A2dpCodecConfig {
        }

        try {
            value = resources.getInteger(R.integer.a2dp_source_codec_priority_ldac);
            value = SystemProperties.getInt(
                "bluetooth.a2dp.source.ldac_priority.config",
                resources.getInteger(R.integer.a2dp_source_codec_priority_ldac));
        } catch (NotFoundException e) {
            value = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
        }
@@ -236,7 +247,9 @@ class A2dpCodecConfig {
        }

        try {
            value = resources.getInteger(R.integer.a2dp_source_codec_priority_lc3);
            value = SystemProperties.getInt(
                "bluetooth.a2dp.source.lc3_priority.config",
                resources.getInteger(R.integer.a2dp_source_codec_priority_lc3));
        } catch (NotFoundException e) {
            value = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
        }