[Panlingual] Improve conditions of supporting app locale.

There are 3 conditions we need to check.
  1. Has locale config file
  2. Has locale config file w/o content
  3. Has locale config file w/ content

 Currently, we do not have condition 2 into the condition group, and we
 need to add it into.

Bug: b/243099750
Test: Manual
Change-Id: I58d0275af53031ba4f4c705022017d5143f45795
This commit is contained in:
tom hsu
2022-08-19 15:12:50 +08:00
committed by Tom Hsu
parent b132484ead
commit 3aa4440b36

View File

@@ -100,8 +100,8 @@ public class AppLocaleUtil {
*/
public static boolean isAppLocaleSupported(Context context, String packageName) {
LocaleList localeList = getPackageLocales(context, packageName);
if (localeList != null && localeList.size() > 0) {
return true;
if (localeList != null) {
return localeList.size() > 0;
}
if (FeatureFlagUtils.isEnabled(