Skip to content

Commit e0b2485

Browse files
authored
Remove annotation for getLocaleFromString() (flutter#33409)
1 parent 62ef5e6 commit e0b2485

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

shell/platform/android/io/flutter/plugin/localization/LocalizationPlugin.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ public void sendLocalesToFlutter(@NonNull Configuration config) {
188188
localizationChannel.sendLocales(locales);
189189
}
190190

191-
@VisibleForTesting
191+
/**
192+
* Computes the {@link Locale} from the provided {@code String} with format
193+
* language[-script][-region][-...], where script is an alphabet string of length 4, and region is
194+
* either an alphabet string of length 2 or a digit string of length 3.
195+
*/
192196
@NonNull
193197
public static Locale localeFromString(@NonNull String localeString) {
194198
// Use Locale.forLanguageTag if available (API 21+).
@@ -201,11 +205,6 @@ public static Locale localeFromString(@NonNull String localeString) {
201205
// Pre-API 21, we fall back to manually parsing the locale tag.
202206
String parts[] = localeString.split("-", -1);
203207

204-
// The format is:
205-
// language[-script][-region][-...]
206-
// where script is an alphabet string of length 4, and region is either an alphabet string of
207-
// length 2 or a digit string of length 3.
208-
209208
// Assume the first part is always the language code.
210209
String languageCode = parts[0];
211210
String scriptCode = "";

0 commit comments

Comments
 (0)