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

Commit 0a43ce3b authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "Add system properties to config audio codec priority"

parents 754e2be8 8cd10b78
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;
@@ -189,7 +190,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;
        }
@@ -199,7 +202,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;
        }
@@ -209,7 +214,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;
        }
@@ -219,7 +226,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;
        }
@@ -229,7 +238,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;
        }
@@ -239,7 +250,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;
        }