Protect LanguageRange behind Android O. (flutter/engine#17882)

This commit is contained in:
Mehmet Fidanboylu
2020-04-23 05:59:52 -07:00
committed by GitHub
parent d5e3357c3f
commit fe52878092
2 changed files with 2 additions and 2 deletions

View File

@@ -861,9 +861,9 @@ public class FlutterView extends FrameLayout {
locales.add(config.locale);
}
List<Locale.LanguageRange> languageRanges = new ArrayList<>();
Locale platformResolvedLocale = null;
if (Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
List<Locale.LanguageRange> languageRanges = new ArrayList<>();
LocaleList localeList = config.getLocales();
int localeCount = localeList.size();
for (int index = 0; index < localeCount; ++index) {

View File

@@ -406,9 +406,9 @@ public class FlutterView extends SurfaceView implements BinaryMessenger, Texture
locales.add(config.locale);
}
List<Locale.LanguageRange> languageRanges = new ArrayList<>();
Locale platformResolvedLocale = null;
if (Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
List<Locale.LanguageRange> languageRanges = new ArrayList<>();
LocaleList localeList = config.getLocales();
int localeCount = localeList.size();
for (int index = 0; index < localeCount; ++index) {