Fixed RTL alignment issue in suggested language list
Suggested language list alignment should be as per the default locale.
Test: 1. RTL language
2. Settings>System>Languages & input>Languages>Add a language>English
3. Check the alignment
Bug: 70360392
Change-Id: I934b1061fb897ac69270a493562defba4a5a1a35
Signed-off-by: susanta.patra <susanta.patra@lge.com>
diff --git a/core/java/com/android/internal/app/SuggestedLocaleAdapter.java b/core/java/com/android/internal/app/SuggestedLocaleAdapter.java
index 46f47a3..d138241 100644
--- a/core/java/com/android/internal/app/SuggestedLocaleAdapter.java
+++ b/core/java/com/android/internal/app/SuggestedLocaleAdapter.java
@@ -199,7 +199,7 @@
text.setTextLocale(item.getLocale());
text.setContentDescription(item.getContentDescription(mCountryMode));
if (mCountryMode) {
- int layoutDir = TextUtils.getLayoutDirectionFromLocale(item.getParent());
+ int layoutDir = TextUtils.getLayoutDirectionFromLocale(Locale.getDefault());
//noinspection ResourceType
convertView.setLayoutDirection(layoutDir);
text.setTextDirection(layoutDir == View.LAYOUT_DIRECTION_RTL