diff --git a/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java b/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java index 39535fff7..3b0d4a3b6 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java @@ -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 set = new HashSet<>(); diff --git a/app-core/src/main/java/com/topjohnwu/magisk/utils/Utils.java b/app-core/src/main/java/com/topjohnwu/magisk/utils/Utils.java index 23a47f641..d2cb23f54 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/utils/Utils.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/utils/Utils.java @@ -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); diff --git a/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java b/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java index 52cfec56e..260b9c518 100644 --- a/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java @@ -129,13 +129,8 @@ public class SuRequestActivity extends BaseActivity { appIcon.setImageDrawable(policy.info.loadIcon(pm)); appNameView.setText(policy.appName); packageNameView.setText(policy.packageName); - if (Build.VERSION.SDK_INT >= 17) { - warning.setCompoundDrawablesRelativeWithIntrinsicBounds( - AppCompatResources.getDrawable(this, R.drawable.ic_warning), null, null, null); - } else { - warning.setCompoundDrawablesWithIntrinsicBounds( - AppCompatResources.getDrawable(this, R.drawable.ic_warning), null, null, null); - } + warning.setCompoundDrawablesRelativeWithIntrinsicBounds( + AppCompatResources.getDrawable(this, R.drawable.ic_warning), null, null, null); ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.allow_timeout, android.R.layout.simple_spinner_item); diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/StringListAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/StringListAdapter.java index b2cd680e0..0aacad2e8 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/StringListAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/StringListAdapter.java @@ -73,7 +73,7 @@ public abstract class StringListAdapter ((Activity) rv.getContext()).getWindowManager() .getDefaultDisplay().getMetrics(displayMetrics); screenWidth = displayMetrics.widthPixels; - padding = rv.getPaddingLeft() + rv.getPaddingRight(); + padding = rv.getPaddingStart() + rv.getPaddingEnd(); this.rv = rv; } diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java index fe502e414..c709c8764 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java @@ -111,10 +111,6 @@ public class SettingsFragment extends BasePreferenceFragment implements Topic.Su setSummary(); - // Remove language setting when API < 17 - if (Build.VERSION.SDK_INT < 17) - generalCatagory.removePreference(findPreference(Config.Key.LOCALE)); - // Disable dangerous settings in secondary user if (Const.USER_ID > 0) { suCategory.removePreference(multiuserConfig); diff --git a/app/src/full/res/layout/activity_flash.xml b/app/src/full/res/layout/activity_flash.xml index 5a8e2eb68..0bc141964 100644 --- a/app/src/full/res/layout/activity_flash.xml +++ b/app/src/full/res/layout/activity_flash.xml @@ -17,8 +17,8 @@ android:id="@+id/recyclerView" android:layout_width="wrap_content" android:layout_height="match_parent" - android:paddingLeft="8dp" - android:paddingRight="8dp" + android:paddingStart="8dp" + android:paddingEnd="8dp" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> diff --git a/app/src/full/res/layout/activity_request.xml b/app/src/full/res/layout/activity_request.xml index b0efb9d26..7d4b6eaa5 100644 --- a/app/src/full/res/layout/activity_request.xml +++ b/app/src/full/res/layout/activity_request.xml @@ -27,8 +27,8 @@ android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:orientation="horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> + android:paddingStart="10dp" + android:paddingEnd="10dp"> + android:paddingStart="30dp" + android:paddingEnd="30dp">