mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 15:20:08 +00:00
Remove SDK 16 support completely
Android 4.1 init miss several significant features Magisk reply on, so the final decision is to forget about it in the future. Pull minSdkVersion of Magisk Manager back to 17 and remove some unnecessary adjustments done for SDK 16
This commit is contained in:
@@ -100,13 +100,9 @@ public class LocaleManager {
|
||||
}
|
||||
|
||||
public static Context getLocaleContext(Context context, Locale locale) {
|
||||
if (Build.VERSION.SDK_INT >= 17) {
|
||||
Configuration config = new Configuration(context.getResources().getConfiguration());
|
||||
config.setLocale(locale);
|
||||
return context.createConfigurationContext(config);
|
||||
} else {
|
||||
return context;
|
||||
}
|
||||
Configuration config = new Configuration(context.getResources().getConfiguration());
|
||||
config.setLocale(locale);
|
||||
return context.createConfigurationContext(config);
|
||||
}
|
||||
|
||||
public static Context getLocaleContext(Locale locale) {
|
||||
@@ -118,8 +114,6 @@ public class LocaleManager {
|
||||
}
|
||||
|
||||
public static void loadAvailableLocales(@StringRes int compareId) {
|
||||
if (Build.VERSION.SDK_INT < 17)
|
||||
return;
|
||||
Shell.EXECUTOR.execute(() -> {
|
||||
locales = new ArrayList<>();
|
||||
HashSet<String> set = new HashSet<>();
|
||||
|
@@ -77,7 +77,7 @@ public class Utils {
|
||||
|
||||
public static String getAppLabel(ApplicationInfo info, PackageManager pm) {
|
||||
try {
|
||||
if (info.labelRes > 0 && Build.VERSION.SDK_INT >= 17) {
|
||||
if (info.labelRes > 0) {
|
||||
Resources res = pm.getResourcesForApplication(info);
|
||||
Configuration config = new Configuration();
|
||||
config.setLocale(LocaleManager.locale);
|
||||
|
Reference in New Issue
Block a user