[Settings] modify to use LocaleHelper on AppLocaleDetails

modify to unifying display name of locale because there is difference between summary and AppLanguageList

Bug: 260625719
Test: run Settings > General > App Language and test summary and list

Change-Id: I62b91a33632251e810d200d56d7274e216568c77
This commit is contained in:
hee.youn
2022-11-25 18:02:16 +09:00
committed by hee youn
parent 39d6e92554
commit dc862b46d2

View File

@@ -35,6 +35,7 @@ import android.widget.TextView;
import androidx.preference.Preference; import androidx.preference.Preference;
import com.android.internal.app.LocaleHelper;
import com.android.settings.R; import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment; import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.Utils; import com.android.settings.Utils;
@@ -213,7 +214,7 @@ public class AppLocaleDetails extends SettingsPreferenceFragment {
if (appLocale == null) { if (appLocale == null) {
return context.getString(R.string.preference_of_system_locale_summary); return context.getString(R.string.preference_of_system_locale_summary);
} else { } else {
return appLocale.getDisplayName(appLocale); return LocaleHelper.getDisplayName(appLocale, appLocale, true);
} }
} }
} }