Bluetooth Settings: Restore Spatial Audio Settings
No need to gate under feature flag, it only shows if Spatial Audio exists on device. Test: Connect BT headset and see spatial audio settings Bug: 264709855 Change-Id: Iddda3eb430b62880036bbe8c680addca07a60ab2
This commit is contained in:
@@ -73,6 +73,9 @@
|
|||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="feature_controls_group"/>
|
android:key="feature_controls_group"/>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="spatial_audio_group"/>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="bluetooth_profiles"/>
|
android:key="bluetooth_profiles"/>
|
||||||
|
|
||||||
|
@@ -16,9 +16,6 @@
|
|||||||
|
|
||||||
package com.android.settings.bluetooth;
|
package com.android.settings.bluetooth;
|
||||||
|
|
||||||
import static com.android.settings.bluetooth.BluetoothDeviceDetailsFragment.FEATURE_HEAD_TRACKING_ORDER;
|
|
||||||
import static com.android.settings.bluetooth.BluetoothDeviceDetailsFragment.FEATURE_SPATIAL_AUDIO_ORDER;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.media.AudioDeviceAttributes;
|
import android.media.AudioDeviceAttributes;
|
||||||
import android.media.AudioDeviceInfo;
|
import android.media.AudioDeviceInfo;
|
||||||
@@ -45,7 +42,7 @@ public class BluetoothDetailsSpatialAudioController extends BluetoothDetailsCont
|
|||||||
implements Preference.OnPreferenceClickListener {
|
implements Preference.OnPreferenceClickListener {
|
||||||
|
|
||||||
private static final String TAG = "BluetoothSpatialAudioController";
|
private static final String TAG = "BluetoothSpatialAudioController";
|
||||||
private static final String KEY_FEATURE_CONTROLS_GROUP = "feature_controls_group";
|
private static final String KEY_SPATIAL_AUDIO_GROUP = "spatial_audio_group";
|
||||||
private static final String KEY_SPATIAL_AUDIO = "spatial_audio";
|
private static final String KEY_SPATIAL_AUDIO = "spatial_audio";
|
||||||
private static final String KEY_HEAD_TRACKING = "head_tracking";
|
private static final String KEY_HEAD_TRACKING = "head_tracking";
|
||||||
|
|
||||||
@@ -98,7 +95,7 @@ public class BluetoothDetailsSpatialAudioController extends BluetoothDetailsCont
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPreferenceKey() {
|
public String getPreferenceKey() {
|
||||||
return KEY_FEATURE_CONTROLS_GROUP;
|
return KEY_SPATIAL_AUDIO_GROUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -112,7 +109,6 @@ public class BluetoothDetailsSpatialAudioController extends BluetoothDetailsCont
|
|||||||
SwitchPreference spatialAudioPref = mProfilesContainer.findPreference(KEY_SPATIAL_AUDIO);
|
SwitchPreference spatialAudioPref = mProfilesContainer.findPreference(KEY_SPATIAL_AUDIO);
|
||||||
if (spatialAudioPref == null) {
|
if (spatialAudioPref == null) {
|
||||||
spatialAudioPref = createSpatialAudioPreference(mProfilesContainer.getContext());
|
spatialAudioPref = createSpatialAudioPreference(mProfilesContainer.getContext());
|
||||||
spatialAudioPref.setOrder(FEATURE_SPATIAL_AUDIO_ORDER);
|
|
||||||
mProfilesContainer.addPreference(spatialAudioPref);
|
mProfilesContainer.addPreference(spatialAudioPref);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +119,6 @@ public class BluetoothDetailsSpatialAudioController extends BluetoothDetailsCont
|
|||||||
SwitchPreference headTrackingPref = mProfilesContainer.findPreference(KEY_HEAD_TRACKING);
|
SwitchPreference headTrackingPref = mProfilesContainer.findPreference(KEY_HEAD_TRACKING);
|
||||||
if (headTrackingPref == null) {
|
if (headTrackingPref == null) {
|
||||||
headTrackingPref = createHeadTrackingPreference(mProfilesContainer.getContext());
|
headTrackingPref = createHeadTrackingPreference(mProfilesContainer.getContext());
|
||||||
headTrackingPref.setOrder(FEATURE_HEAD_TRACKING_ORDER);
|
|
||||||
mProfilesContainer.addPreference(headTrackingPref);
|
mProfilesContainer.addPreference(headTrackingPref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,8 +65,6 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
|||||||
|
|
||||||
static final int FEATURE_HEARING_DEVICE_CONTROLS_ORDER = 1;
|
static final int FEATURE_HEARING_DEVICE_CONTROLS_ORDER = 1;
|
||||||
static final int FEATURE_AUDIO_ROUTING_ORDER = 2;
|
static final int FEATURE_AUDIO_ROUTING_ORDER = 2;
|
||||||
static final int FEATURE_SPATIAL_AUDIO_ORDER = 3;
|
|
||||||
static final int FEATURE_HEAD_TRACKING_ORDER = 4;
|
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static int EDIT_DEVICE_NAME_ITEM_ID = Menu.FIRST;
|
static int EDIT_DEVICE_NAME_ITEM_ID = Menu.FIRST;
|
||||||
|
Reference in New Issue
Block a user