Loading src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +1 −0 Original line number Diff line number Diff line Loading @@ -598,6 +598,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra @Override public void onBluetoothHDAudioEnabled(boolean enabled) { Log.d(TAG, "onBluetoothHDAudioEnabled: " + enabled); for (AbstractPreferenceController controller : mPreferenceControllers) { if (controller instanceof AbstractBluetoothDialogPreferenceController) { ((AbstractBluetoothDialogPreferenceController) controller).onHDAudioEnabled( Loading src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java +23 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,15 @@ public class BluetoothCodecDialogPreferenceController extends ((BaseBluetoothDialogPreference) mPreference).setCallback(this); } @Override public void onHDAudioEnabled(boolean enabled) { Log.d(TAG, " onHDAudioEnabled: " + enabled); if (!enabled) { // If option codec is disabled, SBC is the only only one available codec. onIndexUpdated(convertCfgToBtnIndex(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC)); } } @Override public List<Integer> getSelectableIndex() { List<Integer> index = new ArrayList<>(); Loading Loading @@ -117,6 +126,14 @@ public class BluetoothCodecDialogPreferenceController extends codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC; codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST; break; case 6: codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE; codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST; break; case 7: codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP; codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST; break; default: break; } Loading Loading @@ -171,9 +188,15 @@ public class BluetoothCodecDialogPreferenceController extends case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD: index = 4; break; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE: index = 6; break; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC: index = 5; break; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP: index = 7; break; default: Log.e(TAG, "Unsupported config:" + config); break; Loading src/com/android/settings/development/bluetooth/BluetoothHDAudioPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public class BluetoothHDAudioPreferenceController extends AbstractBluetoothPrefe return true; } final boolean enabled = (Boolean) newValue; Log.e(TAG, "onPreferenceChange: " + enabled); final int prefValue = enabled ? BluetoothA2dp.OPTIONAL_CODECS_PREF_ENABLED : BluetoothA2dp.OPTIONAL_CODECS_PREF_DISABLED; Loading src/com/android/settings/development/bluetooth/BluetoothQualityDialogPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,8 @@ public class BluetoothQualityDialogPreferenceController extends @Override public void onHDAudioEnabled(boolean enabled) { mPreference.setEnabled(false); Log.d(TAG, "onHDAudioEnabled: " + enabled); mPreference.setEnabled(enabled); } @VisibleForTesting Loading Loading
src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +1 −0 Original line number Diff line number Diff line Loading @@ -598,6 +598,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra @Override public void onBluetoothHDAudioEnabled(boolean enabled) { Log.d(TAG, "onBluetoothHDAudioEnabled: " + enabled); for (AbstractPreferenceController controller : mPreferenceControllers) { if (controller instanceof AbstractBluetoothDialogPreferenceController) { ((AbstractBluetoothDialogPreferenceController) controller).onHDAudioEnabled( Loading
src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java +23 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,15 @@ public class BluetoothCodecDialogPreferenceController extends ((BaseBluetoothDialogPreference) mPreference).setCallback(this); } @Override public void onHDAudioEnabled(boolean enabled) { Log.d(TAG, " onHDAudioEnabled: " + enabled); if (!enabled) { // If option codec is disabled, SBC is the only only one available codec. onIndexUpdated(convertCfgToBtnIndex(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC)); } } @Override public List<Integer> getSelectableIndex() { List<Integer> index = new ArrayList<>(); Loading Loading @@ -117,6 +126,14 @@ public class BluetoothCodecDialogPreferenceController extends codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC; codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST; break; case 6: codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE; codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST; break; case 7: codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP; codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST; break; default: break; } Loading Loading @@ -171,9 +188,15 @@ public class BluetoothCodecDialogPreferenceController extends case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD: index = 4; break; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE: index = 6; break; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC: index = 5; break; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP: index = 7; break; default: Log.e(TAG, "Unsupported config:" + config); break; Loading
src/com/android/settings/development/bluetooth/BluetoothHDAudioPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public class BluetoothHDAudioPreferenceController extends AbstractBluetoothPrefe return true; } final boolean enabled = (Boolean) newValue; Log.e(TAG, "onPreferenceChange: " + enabled); final int prefValue = enabled ? BluetoothA2dp.OPTIONAL_CODECS_PREF_ENABLED : BluetoothA2dp.OPTIONAL_CODECS_PREF_DISABLED; Loading
src/com/android/settings/development/bluetooth/BluetoothQualityDialogPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,8 @@ public class BluetoothQualityDialogPreferenceController extends @Override public void onHDAudioEnabled(boolean enabled) { mPreference.setEnabled(false); Log.d(TAG, "onHDAudioEnabled: " + enabled); mPreference.setEnabled(enabled); } @VisibleForTesting Loading