Commit 5fadfaa8 authored by Ludovic Fauvet's avatar Ludovic Fauvet

util: use proper methods name

parent fa9a6f8a
......@@ -153,7 +153,7 @@ public class LibVLC {
Resources res = context.getResources();
if (aoutPref.equals(res.getString(R.string.aout_audiotrack_java)))
sAout = AOUT_AUDIOTRACK_JAVA;
else if (aoutPref.equals(res.getString(R.string.aout_opensles)) && Util.isGingerbread())
else if (aoutPref.equals(res.getString(R.string.aout_opensles)) && Util.isGingerbreadOrLater())
sAout = AOUT_OPENSLES;
else
sAout = AOUT_AUDIOTRACK;
......
......@@ -142,17 +142,17 @@ public class Util {
: R.drawable.background_item2);
}
public static boolean isGingerbread()
public static boolean isGingerbreadOrLater()
{
return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.GINGERBREAD;
}
public static boolean isHoneycomb()
public static boolean isHoneycombOrLater()
{
return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB;
}
public static boolean isICS()
public static boolean isICSOrLater()
{
return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
}
......
......@@ -110,7 +110,7 @@ public class PreferencesActivity extends PreferenceActivity {
// Audio output
ListPreference aoutPref = (ListPreference) findPreference("aout");
int aoutEntriesId = Util.isGingerbread() ? R.array.aouts : R.array.aouts_froyo;
int aoutEntriesId = Util.isGingerbreadOrLater() ? R.array.aouts : R.array.aouts_froyo;
aoutPref.setEntries(aoutEntriesId);
aoutPref.setEntryValues(aoutEntriesId);
aoutPref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment