Skip to content

Commit

Permalink
Protect LanguageRange behind Android O. (flutter#17882)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetf authored Apr 23, 2020
1 parent 31ecf87 commit feb94f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,9 @@ private void sendLocalesToFlutter(@NonNull Configuration config) {
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) {
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/io/flutter/view/FlutterView.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ private void sendLocalesToDart(Configuration config) {
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) {
Expand Down

0 comments on commit feb94f6

Please sign in to comment.