disable custom download location on newer phones for now

This commit is contained in:
dkanada 2021-06-05 18:47:01 +09:00
commit 47e81d87be

View file

@ -83,6 +83,7 @@ public class SettingsActivity extends AbsBaseActivity {
final TwoStatePreference colorAppShortcuts = findPreference(PreferenceUtil.COLORED_SHORTCUTS); final TwoStatePreference colorAppShortcuts = findPreference(PreferenceUtil.COLORED_SHORTCUTS);
final Preference categoryPreference = findPreference(PreferenceUtil.CATEGORIES); final Preference categoryPreference = findPreference(PreferenceUtil.CATEGORIES);
final Preference nowPlayingPreference = findPreference(PreferenceUtil.NOW_PLAYING_SCREEN); final Preference nowPlayingPreference = findPreference(PreferenceUtil.NOW_PLAYING_SCREEN);
final Preference downloadLocationPreference = findPreference(PreferenceUtil.LOCATION_DOWNLOAD);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
classicNotification.setEnabled(false); classicNotification.setEnabled(false);
@ -93,6 +94,10 @@ public class SettingsActivity extends AbsBaseActivity {
colorAppShortcuts.setEnabled(false); colorAppShortcuts.setEnabled(false);
} }
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
downloadLocationPreference.setEnabled(false);
}
categoryPreference.setOnPreferenceClickListener(preference -> { categoryPreference.setOnPreferenceClickListener(preference -> {
CategoryPreferenceDialog.newInstance().show(getParentFragmentManager(), CategoryPreferenceDialog.TAG); CategoryPreferenceDialog.newInstance().show(getParentFragmentManager(), CategoryPreferenceDialog.TAG);
return false; return false;