Merge "Update strings for hearing device U features" into udc-dev am: 5c1652eab0 am: c7f1eb2232

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22087473

Change-Id: I18fbcf3a3fe2f1428c4a39fd4ee3fabd0c7f89d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jason Hsu
2023-03-16 10:18:22 +00:00
committed by Automerger Merge Worker
5 changed files with 31 additions and 21 deletions

View File

@@ -38,7 +38,7 @@ import com.android.settingslib.search.SearchIndexable;
public class AccessibilityHearingAidsFragment extends AccessibilityShortcutPreferenceFragment {
private static final String TAG = "AccessibilityHearingAidsFragment";
private static final String KEY_DEVICE_CONTROL_CATEGORY = "device_control_category";
private static final String KEY_HEARING_OPTIONS_CATEGORY = "hearing_options_category";
private static final int FIRST_PREFERENCE_IN_CATEGORY_INDEX = -1;
private String mFeatureName;
@@ -63,8 +63,8 @@ public class AccessibilityHearingAidsFragment extends AccessibilityShortcutPrefe
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = super.onCreateView(inflater, container, savedInstanceState);
final PreferenceCategory controlCategory = findPreference(KEY_DEVICE_CONTROL_CATEGORY);
// Move the preference under controlCategory need to remove the original first.
final PreferenceCategory controlCategory = findPreference(KEY_HEARING_OPTIONS_CATEGORY);
// To move the shortcut preference under controlCategory need to remove the original added.
mShortcutPreference.setOrder(FIRST_PREFERENCE_IN_CATEGORY_INDEX);
getPreferenceScreen().removePreference(mShortcutPreference);
controlCategory.addPreference(mShortcutPreference);
@@ -110,7 +110,8 @@ public class AccessibilityHearingAidsFragment extends AccessibilityShortcutPrefe
@Override
protected boolean showGeneralCategory() {
// Have customized category for accessibility hearings aids page.
// Have static preference under dynamically created PreferenceCategory KEY_GENERAL_CATEGORY.
// In order to modify that, we need to use our own PreferenceCategory for this page.
return false;
}