Loading aconfig/development/settings_core_flag_declarations.aconfig +0 −7 Original line number Diff line number Diff line package: "com.android.settings.development" container: "system" flag { name: "a2dp_offload_codec_extensibility_settings" namespace: "bluetooth" description: "Feature flag for Bluetooth Audio Codec extensibility in Settings" bug: "323319530" } flag { name: "deprecate_list_activity" namespace: "android_settings" Loading res/layout/bluetooth_audio_codec_dialog.xmldeleted 100644 → 0 +0 −75 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2019 The Android Open Source 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. --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="8dp"> <RadioGroup android:id="@+id/bluetooth_audio_codec_radio_group" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/developer_option_dialog_margin_start"> <include android:id="@+id/bluetooth_audio_codec_default" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_sbc" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_aac" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_aptx" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_aptx_hd" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_ldac" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_lc3" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_opus" layout="@layout/preference_widget_dialog_radiobutton"/> </RadioGroup> <include android:id="@+id/bluetooth_audio_codec_help_info" layout="@layout/preference_widget_dialog_summary"/> </LinearLayout> </ScrollView> res/xml/development_settings.xml +0 −8 Original line number Diff line number Diff line Loading @@ -429,14 +429,6 @@ android:key="bluetooth_hd_audio_settings" android:title="@string/bluetooth_profile_a2dp_high_quality_unknown_codec"/> <com.android.settings.development.bluetooth.BluetoothCodecDialogPreference android:key="bluetooth_audio_codec_settings" android:title="@string/bluetooth_select_a2dp_codec_type" android:dialogTitle="@string/bluetooth_select_a2dp_codec_type_dialog_title" android:dialogLayout="@layout/bluetooth_audio_codec_dialog" android:positiveButtonText="" android:negativeButtonText="@string/dlg_ok"/> <ListPreference android:key="bluetooth_audio_codec_settings_list" android:title="@string/bluetooth_select_a2dp_codec_type" Loading src/com/android/settings/development/BluetoothA2dpConfigStore.java +1 −27 Original line number Diff line number Diff line Loading @@ -16,11 +16,9 @@ package com.android.settings.development; import android.annotation.FlaggedApi; import android.bluetooth.BluetoothCodecConfig; import android.bluetooth.BluetoothCodecType; import androidx.annotation.NonNull; import androidx.annotation.Nullable; /** Utility class for storing current Bluetooth A2DP profile values */ Loading @@ -38,10 +36,6 @@ public class BluetoothA2dpConfigStore { private long mCodecSpecific3Value; private long mCodecSpecific4Value; public void setCodecType(int codecType) { mCodecTypeNative = codecType; } public void setCodecType(@Nullable BluetoothCodecType codecType) { mCodecType = codecType; } Loading Loading @@ -82,6 +76,7 @@ public class BluetoothA2dpConfigStore { public BluetoothCodecConfig createCodecConfig() { BluetoothCodecConfig.Builder builder = new BluetoothCodecConfig.Builder() .setCodecPriority(mCodecPriority) .setExtendedCodecType(mCodecType) .setSampleRate(mSampleRate) .setBitsPerSample(mBitsPerSample) .setChannelMode(mChannelMode) Loading @@ -89,27 +84,6 @@ public class BluetoothA2dpConfigStore { .setCodecSpecific2(mCodecSpecific2Value) .setCodecSpecific3(mCodecSpecific3Value) .setCodecSpecific4(mCodecSpecific4Value); if (Flags.a2dpOffloadCodecExtensibilitySettings()) { builder.setExtendedCodecType(mCodecType); } else { builder.setCodecType(mCodecTypeNative); } return builder.build(); } /** Create codec config utilizing {@link BluetoothCodecType} */ @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY_SETTINGS) public @NonNull BluetoothCodecConfig createCodecConfigFromCodecType() { return new BluetoothCodecConfig.Builder() .setExtendedCodecType(mCodecType) .setCodecPriority(mCodecPriority) .setSampleRate(mSampleRate) .setBitsPerSample(mBitsPerSample) .setChannelMode(mChannelMode) .setCodecSpecific1(mCodecSpecific1Value) .setCodecSpecific2(mCodecSpecific2Value) .setCodecSpecific3(mCodecSpecific3Value) .setCodecSpecific4(mCodecSpecific4Value) .build(); } } src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +1 −5 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ import com.android.settings.development.bluetooth.AbstractBluetoothDialogPrefere import com.android.settings.development.bluetooth.AbstractBluetoothPreferenceController; import com.android.settings.development.bluetooth.BluetoothBitPerSampleDialogPreferenceController; import com.android.settings.development.bluetooth.BluetoothChannelModeDialogPreferenceController; import com.android.settings.development.bluetooth.BluetoothCodecDialogPreferenceController; import com.android.settings.development.bluetooth.BluetoothCodecListPreferenceController; import com.android.settings.development.bluetooth.BluetoothHDAudioPreferenceController; import com.android.settings.development.bluetooth.BluetoothQualityDialogPreferenceController; Loading Loading @@ -802,8 +801,6 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra controllers.add(new AutofillCategoryController(context, lifecycle)); controllers.add(new AutofillLoggingLevelPreferenceController(context, lifecycle)); controllers.add(new AutofillResetOptionsPreferenceController(context)); controllers.add(new BluetoothCodecDialogPreferenceController(context, lifecycle, bluetoothA2dpConfigStore, fragment)); controllers.add( new BluetoothCodecListPreferenceController( context, lifecycle, bluetoothA2dpConfigStore, fragment)); Loading Loading @@ -838,8 +835,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra @Override public void onBluetoothCodecChanged() { for (AbstractPreferenceController controller : mPreferenceControllers) { if (controller instanceof AbstractBluetoothDialogPreferenceController && !(controller instanceof BluetoothCodecDialogPreferenceController)) { if (controller instanceof AbstractBluetoothDialogPreferenceController) { ((AbstractBluetoothDialogPreferenceController) controller) .onBluetoothCodecUpdated(); } Loading Loading
aconfig/development/settings_core_flag_declarations.aconfig +0 −7 Original line number Diff line number Diff line package: "com.android.settings.development" container: "system" flag { name: "a2dp_offload_codec_extensibility_settings" namespace: "bluetooth" description: "Feature flag for Bluetooth Audio Codec extensibility in Settings" bug: "323319530" } flag { name: "deprecate_list_activity" namespace: "android_settings" Loading
res/layout/bluetooth_audio_codec_dialog.xmldeleted 100644 → 0 +0 −75 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2019 The Android Open Source 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. --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="8dp"> <RadioGroup android:id="@+id/bluetooth_audio_codec_radio_group" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/developer_option_dialog_margin_start"> <include android:id="@+id/bluetooth_audio_codec_default" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_sbc" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_aac" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_aptx" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_aptx_hd" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_ldac" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_lc3" layout="@layout/preference_widget_dialog_radiobutton"/> <include android:id="@+id/bluetooth_audio_codec_opus" layout="@layout/preference_widget_dialog_radiobutton"/> </RadioGroup> <include android:id="@+id/bluetooth_audio_codec_help_info" layout="@layout/preference_widget_dialog_summary"/> </LinearLayout> </ScrollView>
res/xml/development_settings.xml +0 −8 Original line number Diff line number Diff line Loading @@ -429,14 +429,6 @@ android:key="bluetooth_hd_audio_settings" android:title="@string/bluetooth_profile_a2dp_high_quality_unknown_codec"/> <com.android.settings.development.bluetooth.BluetoothCodecDialogPreference android:key="bluetooth_audio_codec_settings" android:title="@string/bluetooth_select_a2dp_codec_type" android:dialogTitle="@string/bluetooth_select_a2dp_codec_type_dialog_title" android:dialogLayout="@layout/bluetooth_audio_codec_dialog" android:positiveButtonText="" android:negativeButtonText="@string/dlg_ok"/> <ListPreference android:key="bluetooth_audio_codec_settings_list" android:title="@string/bluetooth_select_a2dp_codec_type" Loading
src/com/android/settings/development/BluetoothA2dpConfigStore.java +1 −27 Original line number Diff line number Diff line Loading @@ -16,11 +16,9 @@ package com.android.settings.development; import android.annotation.FlaggedApi; import android.bluetooth.BluetoothCodecConfig; import android.bluetooth.BluetoothCodecType; import androidx.annotation.NonNull; import androidx.annotation.Nullable; /** Utility class for storing current Bluetooth A2DP profile values */ Loading @@ -38,10 +36,6 @@ public class BluetoothA2dpConfigStore { private long mCodecSpecific3Value; private long mCodecSpecific4Value; public void setCodecType(int codecType) { mCodecTypeNative = codecType; } public void setCodecType(@Nullable BluetoothCodecType codecType) { mCodecType = codecType; } Loading Loading @@ -82,6 +76,7 @@ public class BluetoothA2dpConfigStore { public BluetoothCodecConfig createCodecConfig() { BluetoothCodecConfig.Builder builder = new BluetoothCodecConfig.Builder() .setCodecPriority(mCodecPriority) .setExtendedCodecType(mCodecType) .setSampleRate(mSampleRate) .setBitsPerSample(mBitsPerSample) .setChannelMode(mChannelMode) Loading @@ -89,27 +84,6 @@ public class BluetoothA2dpConfigStore { .setCodecSpecific2(mCodecSpecific2Value) .setCodecSpecific3(mCodecSpecific3Value) .setCodecSpecific4(mCodecSpecific4Value); if (Flags.a2dpOffloadCodecExtensibilitySettings()) { builder.setExtendedCodecType(mCodecType); } else { builder.setCodecType(mCodecTypeNative); } return builder.build(); } /** Create codec config utilizing {@link BluetoothCodecType} */ @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY_SETTINGS) public @NonNull BluetoothCodecConfig createCodecConfigFromCodecType() { return new BluetoothCodecConfig.Builder() .setExtendedCodecType(mCodecType) .setCodecPriority(mCodecPriority) .setSampleRate(mSampleRate) .setBitsPerSample(mBitsPerSample) .setChannelMode(mChannelMode) .setCodecSpecific1(mCodecSpecific1Value) .setCodecSpecific2(mCodecSpecific2Value) .setCodecSpecific3(mCodecSpecific3Value) .setCodecSpecific4(mCodecSpecific4Value) .build(); } }
src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +1 −5 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ import com.android.settings.development.bluetooth.AbstractBluetoothDialogPrefere import com.android.settings.development.bluetooth.AbstractBluetoothPreferenceController; import com.android.settings.development.bluetooth.BluetoothBitPerSampleDialogPreferenceController; import com.android.settings.development.bluetooth.BluetoothChannelModeDialogPreferenceController; import com.android.settings.development.bluetooth.BluetoothCodecDialogPreferenceController; import com.android.settings.development.bluetooth.BluetoothCodecListPreferenceController; import com.android.settings.development.bluetooth.BluetoothHDAudioPreferenceController; import com.android.settings.development.bluetooth.BluetoothQualityDialogPreferenceController; Loading Loading @@ -802,8 +801,6 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra controllers.add(new AutofillCategoryController(context, lifecycle)); controllers.add(new AutofillLoggingLevelPreferenceController(context, lifecycle)); controllers.add(new AutofillResetOptionsPreferenceController(context)); controllers.add(new BluetoothCodecDialogPreferenceController(context, lifecycle, bluetoothA2dpConfigStore, fragment)); controllers.add( new BluetoothCodecListPreferenceController( context, lifecycle, bluetoothA2dpConfigStore, fragment)); Loading Loading @@ -838,8 +835,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra @Override public void onBluetoothCodecChanged() { for (AbstractPreferenceController controller : mPreferenceControllers) { if (controller instanceof AbstractBluetoothDialogPreferenceController && !(controller instanceof BluetoothCodecDialogPreferenceController)) { if (controller instanceof AbstractBluetoothDialogPreferenceController) { ((AbstractBluetoothDialogPreferenceController) controller) .onBluetoothCodecUpdated(); } Loading