Merge "Update the strings for bluetooth hearing device details page in U" into udc-dev

This commit is contained in:
Jason Hsu
2023-03-21 11:39:44 +00:00
committed by Android (Google) Code Review
5 changed files with 16 additions and 18 deletions

View File

@@ -16,7 +16,6 @@
package com.android.settings.bluetooth;
import static com.android.settings.bluetooth.BluetoothDeviceDetailsFragment.FEATURE_AUDIO_ROUTING_ORDER;
import static com.android.settings.bluetooth.BluetoothDeviceDetailsFragment.KEY_DEVICE_ADDRESS;
import android.content.Context;
@@ -38,7 +37,7 @@ import com.android.settingslib.core.lifecycle.Lifecycle;
*/
public class BluetoothDetailsAudioRoutingController extends BluetoothDetailsController {
private static final String KEY_FEATURE_CONTROLS_GROUP = "feature_controls_group";
private static final String KEY_DEVICE_CONTROLS_SPECIFIC_GROUP = "device_controls_specific";
@VisibleForTesting
static final String KEY_AUDIO_ROUTING = "audio_routing";
@@ -61,7 +60,6 @@ public class BluetoothDetailsAudioRoutingController extends BluetoothDetailsCont
final PreferenceCategory prefCategory = screen.findPreference(getPreferenceKey());
final Preference pref = createAudioRoutingPreference(prefCategory.getContext());
pref.setOrder(FEATURE_AUDIO_ROUTING_ORDER);
prefCategory.addPreference(pref);
}
@@ -70,7 +68,7 @@ public class BluetoothDetailsAudioRoutingController extends BluetoothDetailsCont
@Override
public String getPreferenceKey() {
return KEY_FEATURE_CONTROLS_GROUP;
return KEY_DEVICE_CONTROLS_SPECIFIC_GROUP;
}
private Preference createAudioRoutingPreference(Context context) {

View File

@@ -16,8 +16,6 @@
package com.android.settings.bluetooth;
import static com.android.settings.bluetooth.BluetoothDeviceDetailsFragment.FEATURE_HEARING_DEVICE_CONTROLS_ORDER;
import android.content.Context;
import android.text.TextUtils;
import android.util.FeatureFlagUtils;
@@ -41,7 +39,7 @@ import com.google.common.annotations.VisibleForTesting;
public class BluetoothDetailsHearingDeviceControlsController extends BluetoothDetailsController
implements Preference.OnPreferenceClickListener {
private static final String KEY_FEATURE_CONTROLS_GROUP = "feature_controls_group";
private static final String KEY_DEVICE_CONTROLS_GENERAL_GROUP = "device_controls_general";
@VisibleForTesting
static final String KEY_HEARING_DEVICE_CONTROLS = "hearing_device_controls";
@@ -65,7 +63,6 @@ public class BluetoothDetailsHearingDeviceControlsController extends BluetoothDe
final PreferenceCategory prefCategory = screen.findPreference(getPreferenceKey());
final Preference pref = createHearingDeviceControlsPreference(prefCategory.getContext());
pref.setOrder(FEATURE_HEARING_DEVICE_CONTROLS_ORDER);
prefCategory.addPreference(pref);
}
@@ -74,7 +71,7 @@ public class BluetoothDetailsHearingDeviceControlsController extends BluetoothDe
@Override
public String getPreferenceKey() {
return KEY_FEATURE_CONTROLS_GROUP;
return KEY_DEVICE_CONTROLS_GENERAL_GROUP;
}
@Override
@@ -90,7 +87,6 @@ public class BluetoothDetailsHearingDeviceControlsController extends BluetoothDe
final Preference preference = new Preference(context);
preference.setKey(KEY_HEARING_DEVICE_CONTROLS);
preference.setTitle(context.getString(R.string.bluetooth_device_controls_title));
preference.setSummary(context.getString(R.string.bluetooth_device_controls_summary));
preference.setOnPreferenceClickListener(this);
return preference;

View File

@@ -63,9 +63,6 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
public static final String KEY_DEVICE_ADDRESS = "device_address";
private static final String TAG = "BTDeviceDetailsFrg";
static final int FEATURE_HEARING_DEVICE_CONTROLS_ORDER = 1;
static final int FEATURE_AUDIO_ROUTING_ORDER = 2;
@VisibleForTesting
static int EDIT_DEVICE_NAME_ITEM_ID = Menu.FIRST;