Update the strings for bluetooth hearing device details page in U

Bug: 270086620
Test: flash rom and check the device details page UI for hearing device
Change-Id: Iae1a7fae9f51ed8318d757ed7b3eefe0261b28a1
This commit is contained in:
jasonwshsu
2023-03-20 23:00:07 +08:00
parent 7be7ef9ecc
commit fd76efc7fd
5 changed files with 16 additions and 18 deletions

View File

@@ -130,10 +130,12 @@
<string name="bluetooth_pair_other_ear_dialog_right_ear_positive_button">Pair right ear</string>
<!-- Connected devices settings. Positive button of the dialog to help user to pair left ear of the hearing aid device. Dialog shows when only one of the hearing aid device set is connected. [CHAR LIMIT=20] -->
<string name="bluetooth_pair_other_ear_dialog_left_ear_positive_button">Pair left ear</string>
<!-- Connected devices settings. Title of the preference to show the entrance of the hearing device controls page. [CHAR LIMIT=35] -->
<string name="bluetooth_device_controls_title">Hearing device controls</string>
<!-- Connected devices settings. Summary of the preference to show the entrance of the hearing device controls page. [CHAR LIMIT=NONE] -->
<string name="bluetooth_device_controls_summary">Hearing device shortcut, hearing aid compatibility</string>
<!-- Title for all hearing devices related controls section. [CHAR LIMIT=60] -->
<string name="bluetooth_device_controls_general">For all available hearing devices</string>
<!-- Connected devices settings. Title of the preference to show the entrance of the hearing device controls related page. [CHAR LIMIT=65] -->
<string name="bluetooth_device_controls_title">Shortcuts &amp; hearing aid compatibility</string>
<!-- Title for this device specific controls section. [CHAR LIMIT=30] -->
<string name="bluetooth_device_controls_specific">For this device</string>
<!-- Connected devices settings. Title of the preference to show the entrance of the audio output page. It can change different types of audio are played on phone or other bluetooth devices. [CHAR LIMIT=35] -->
<string name="bluetooth_audio_routing_title">Audio output</string>
<!-- Title for bluetooth audio routing page footer. [CHAR LIMIT=30] -->

View File

@@ -71,7 +71,12 @@
android:key="device_companion_apps"/>
<PreferenceCategory
android:key="feature_controls_group"/>
android:key="device_controls_general"
android:title="@string/bluetooth_device_controls_general"/>
<PreferenceCategory
android:key="device_controls_specific"
android:title="@string/bluetooth_device_controls_specific"/>
<PreferenceCategory
android:key="spatial_audio_group"/>

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;