From b8e055ce6492e89a8a26995534d35b6e712b9e36 Mon Sep 17 00:00:00 2001
From: kyle-sylvestre <[EMAIL REDACTED]>
Date: Tue, 20 May 2025 19:11:46 -0400
Subject: [PATCH] use SDL style - else on same line as closing brace
---
.../src/main/java/org/libsdl/app/SDLActivity.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
index c3976135495f4..278be4682544a 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -2129,8 +2129,7 @@ public static String getPreferredLocales() {
if (i != 0) result += ",";
result += formatLocale(locales.get(i));
}
- }
- else if (mCurrentLocale != null) {
+ } else if (mCurrentLocale != null) {
result = formatLocale(mCurrentLocale);
}
return result;
@@ -2142,19 +2141,16 @@ public static String formatLocale(Locale locale) {
if (locale.getLanguage() == "in") {
// Indonesian is "id" according to ISO 639.2, but on Android is "in" because of Java backwards compatibility
lang = "id";
- }
- else if (locale.getLanguage() == "") {
+ } else if (locale.getLanguage() == "") {
// Make sure language is never empty
lang = "und";
- }
- else {
+ } else {
lang = locale.getLanguage();
}
if (locale.getCountry() == "") {
result = lang;
- }
- else {
+ } else {
result = lang + "_" + locale.getCountry();
}
return result;