From 621d3fa0402868ca227ed8991c6838bce54eef89 Mon Sep 17 00:00:00 2001 From: Michal Srutek Date: Thu, 21 Dec 2023 08:22:55 +0100 Subject: [PATCH] Locale split --- .../flutter_inappwebview_android/PlatformUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java index 0ed6aa1f..7a2459fc 100755 --- a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java +++ b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java @@ -52,10 +52,10 @@ public class PlatformUtil extends ChannelDelegateImpl { if (locale == null) { return Locale.US; } - String[] localeSplitted = locale.split("_"); - String language = localeSplitted[0]; - String country = localeSplitted.length > 1 ? localeSplitted[1] : ""; - String variant = localeSplitted.length > 2 ? localeSplitted[2] : ""; + String[] localeSplit = locale.split("_"); + String language = localeSplit[0]; + String country = localeSplit.length > 1 ? localeSplit[1] : ""; + String variant = localeSplit.length > 2 ? localeSplit[2] : ""; return new Locale(language, country, variant); }