misc. linting

This commit is contained in:
Marnes
2024-11-01 18:27:33 +01:00
parent 45d2b6206e
commit 1b0fd94a8c
3 changed files with 6 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.IntegerRes;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.preference.PreferenceManager;
@@ -15,7 +16,7 @@ import protect.card_locker.Utils;
public class Settings {
private final Context mContext;
private SharedPreferences mSettings;
private final SharedPreferences mSettings;
public Settings(Context context) {
mContext = context.getApplicationContext();
@@ -42,10 +43,11 @@ public class Settings {
return mSettings.getBoolean(getResString(keyId), defaultValue);
}
@Nullable
public Locale getLocale() {
String value = getString(R.string.settings_key_locale, "");
if (value.length() == 0) {
if (value.isEmpty()) {
return null;
}

View File

@@ -294,4 +294,4 @@
<string name="useBackImage">Gebruik achterzijde van kaart</string>
<string name="settings_use_volume_keys_navigation">Verwissel kaart met de volume knoppen</string>
<string name="settings_use_volume_keys_navigation_summary">Gebruik de volume knoppen om te wisselen van getoonde kaart</string>
</resources>
</resources>

View File

@@ -112,4 +112,4 @@
</PreferenceCategory>
</PreferenceScreen>
</PreferenceScreen>