[Android] util: use proper methods name

Ludovic Fauvet git at videolan.org
Thu Jun 21 19:40:47 CEST 2012


android | branch: master | Ludovic Fauvet <etix at videolan.org> | Thu Jun 21 19:37:40 2012 +0200| [5fadfaa80180a56283348f6471cdd35c673a3927] | committer: Ludovic Fauvet

util: use proper methods name

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=5fadfaa80180a56283348f6471cdd35c673a3927
---

 vlc-android/src/org/videolan/vlc/LibVLC.java                  |    2 +-
 vlc-android/src/org/videolan/vlc/Util.java                    |    6 +++---
 vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/LibVLC.java b/vlc-android/src/org/videolan/vlc/LibVLC.java
index 62b39a6..2355267 100644
--- a/vlc-android/src/org/videolan/vlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/vlc/LibVLC.java
@@ -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;
diff --git a/vlc-android/src/org/videolan/vlc/Util.java b/vlc-android/src/org/videolan/vlc/Util.java
index 89c3261..cbb054d 100644
--- a/vlc-android/src/org/videolan/vlc/Util.java
+++ b/vlc-android/src/org/videolan/vlc/Util.java
@@ -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;
     }
diff --git a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
index 83f5b4f..90409f1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
@@ -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() {



More information about the Android mailing list