From 14d70df55cfed43df1d5d4ffa90b90b0aabf6d7b Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Thu, 25 Oct 2018 20:56:39 +0200 Subject: [PATCH] Use SwitchPreference on Android 7 --- src/org/kde/kdeconnect/UserInterface/SettingsFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/kde/kdeconnect/UserInterface/SettingsFragment.java b/src/org/kde/kdeconnect/UserInterface/SettingsFragment.java index 64bbbb0d..36590db1 100644 --- a/src/org/kde/kdeconnect/UserInterface/SettingsFragment.java +++ b/src/org/kde/kdeconnect/UserInterface/SettingsFragment.java @@ -29,8 +29,8 @@ public class SettingsFragment extends PreferenceFragmentCompat implements MainAc } TwoStatePreference createTwoStatePreferenceCompat(Context context) { - //The switch didn't work on Android 6, not sure about 7 - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + //SwitchPreference doesn't work on Android 6 + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) { return new SwitchPreference(context); } else { return new CheckBoxPreference(context);