From d3903cbc9deec61885953112cfb6e88b00d8abec Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 30 Nov 2017 22:07:12 -0800 Subject: [PATCH] Fix another crash in Android 4.4 --- .../scala/com/github/shadowsocks/ShadowsocksApplication.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala b/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala index c27af806c9..a694de81d6 100644 --- a/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala +++ b/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala @@ -103,7 +103,8 @@ class ShadowsocksApplication extends Application { case "SG" => SIMPLIFIED_CHINESE case "HK" | "MO" => TRADITIONAL_CHINESE case _ => - Log.w(TAG, "Unknown zh locale: %s. Falling back to zh-Hans-CN...".format(locale.toLanguageTag)) + Log.w(TAG, "Unknown zh locale: %s. Falling back to zh-Hans-CN..." + .formatLocal(Locale.ENGLISH, if (Build.VERSION.SDK_INT >= 21) locale.toLanguageTag else locale)) SIMPLIFIED_CHINESE } }