mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-11-12 21:02:58 +00:00
Update the way to deal with configs
This commit is contained in:
@@ -5,6 +5,7 @@ import android.content.ContextWrapper;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
@@ -90,7 +91,7 @@ public class LocaleManager {
|
||||
|
||||
public static void setLocale(ContextWrapper wrapper) {
|
||||
String localeConfig = Config.get(Config.Key.LOCALE);
|
||||
if (localeConfig.isEmpty()) {
|
||||
if (TextUtils.isEmpty(localeConfig)) {
|
||||
locale = defaultLocale;
|
||||
} else {
|
||||
locale = forLanguageTag(localeConfig);
|
||||
|
||||
Reference in New Issue
Block a user