summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Josh Hou <joshhou@google.com> 2022-04-07 13:11:30 +0800
committer Josh Hou <joshhou@google.com> 2022-04-08 09:52:56 +0800
commitdb37825c6facc3e6bea4dbfcff6dcce744847cdc (patch)
treef83506ed85af1e374463248c3afa238903f27557
parent152e524ebee40399e97b3fab45b4641bded24f8e (diff)
[Panlingual] Screen title is displayed incorrectly
Fix the issue that the screen title name of the app language page is displayed incorrectly Bug: 227285277 Test: Verify the issue by testing between the system language and app language page Change-Id: I229b9ff2defb68d70248a95886d8600e1bc464ea
-rw-r--r--core/java/com/android/internal/app/LocalePickerWithRegion.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/com/android/internal/app/LocalePickerWithRegion.java b/core/java/com/android/internal/app/LocalePickerWithRegion.java
index 52c74cf81508..ac1d2c724e89 100644
--- a/core/java/com/android/internal/app/LocalePickerWithRegion.java
+++ b/core/java/com/android/internal/app/LocalePickerWithRegion.java
@@ -61,6 +61,7 @@ public class LocalePickerWithRegion extends ListFragment implements SearchView.O
private int mFirstVisiblePosition = 0;
private int mTopDistance = 0;
private String mAppPackageName;
+ private CharSequence mTitle = null;
/**
* Other classes can register to be notified when a locale was selected.
@@ -202,6 +203,7 @@ public class LocalePickerWithRegion extends ListFragment implements SearchView.O
return;
}
+ mTitle = getActivity().getTitle();
final boolean countryMode = mParentLocale != null;
final Locale sortingLocale = countryMode ? mParentLocale.getLocale() : Locale.getDefault();
mAdapter = new SuggestedLocaleAdapter(mLocaleList, countryMode, mAppPackageName);
@@ -237,7 +239,7 @@ public class LocalePickerWithRegion extends ListFragment implements SearchView.O
if (mParentLocale != null) {
getActivity().setTitle(mParentLocale.getFullNameNative());
} else {
- getActivity().setTitle(R.string.language_selection_title);
+ getActivity().setTitle(mTitle);
}
getListView().requestFocus();