[Android] Use VLC util method
Geoffrey Métais
git at videolan.org
Fri Apr 15 14:16:53 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 15 14:07:05 2016 +0200| [1e3642eba319320b9cea7eb5382d7100c07f75ff] | committer: Geoffrey Métais
Use VLC util method
> https://code.videolan.org/videolan/vlc-android/commit/1e3642eba319320b9cea7eb5382d7100c07f75ff
---
.../src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.java b/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.java
index bae0851..7f0c7e2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.java
@@ -23,7 +23,6 @@
package org.videolan.vlc.gui.preferences;
-import android.os.Build;
import android.os.Bundle;
import android.support.v14.preference.MultiSelectListPreference;
import android.support.v4.app.DialogFragment;
@@ -32,6 +31,7 @@ import android.support.v7.app.AppCompatActivity;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceFragmentCompat;
+import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.vlc.R;
import org.videolan.vlc.gui.preferences.hack.MultiSelectListPreferenceDialogFragmentCompat;
@@ -64,8 +64,7 @@ public abstract class BasePreferenceFragment extends PreferenceFragmentCompat {
@Override
public void onDisplayPreferenceDialog(Preference preference) {
- if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH
- && preference instanceof MultiSelectListPreference) {
+ if (AndroidUtil.isHoneycombOrLater() && preference instanceof MultiSelectListPreference) {
DialogFragment dialogFragment = MultiSelectListPreferenceDialogFragmentCompat.newInstance(preference.getKey());
dialogFragment.setTargetFragment(this, 0);
dialogFragment.show(getFragmentManager(), DIALOG_FRAGMENT_TAG);
More information about the Android
mailing list