[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:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user