Skip to content

Commit

Permalink
fix a crash when some locale items are not found for the current locale
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Dec 25, 2024
1 parent 2199c02 commit 4193ebf
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/main/kotlin/com/zoffcc/applications/trifa/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,20 @@ class MainActivity
{
e.printStackTrace()
}
val locale = Locale.getDefault()
Log.i(TAG, locale.displayCountry)
Log.i(TAG, locale.displayLanguage)
Log.i(TAG, locale.displayName)
Log.i(TAG, locale.isO3Country)
Log.i(TAG, locale.isO3Language)
Log.i(TAG, locale.language)
Log.i(TAG, locale.country)
try
{
val locale = Locale.getDefault()
Log.i(TAG, locale.displayCountry)
Log.i(TAG, locale.displayLanguage)
Log.i(TAG, locale.displayName)
Log.i(TAG, locale.isO3Country)
Log.i(TAG, locale.isO3Language)
Log.i(TAG, locale.language)
Log.i(TAG, locale.country)
}
catch (_: Exception)
{
}
try
{
Thread.currentThread().name = "t_main"
Expand Down

0 comments on commit 4193ebf

Please sign in to comment.