diff --git a/src/org/fdroid/fdroid/AppListManager.java b/src/org/fdroid/fdroid/AppListManager.java index e79fa1a84..13f73c259 100644 --- a/src/org/fdroid/fdroid/AppListManager.java +++ b/src/org/fdroid/fdroid/AppListManager.java @@ -6,6 +6,7 @@ import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.util.Log; import android.widget.ArrayAdapter; +import android.os.Build; import org.fdroid.fdroid.views.AppListAdapter; import org.fdroid.fdroid.views.AvailableAppListAdapter; @@ -98,7 +99,14 @@ public class AppListManager { categories.add(categoryWhatsNew); categories.add(categoryRecentlyUpdated); categories.add(categoryAll); - categories.addAll(db.getCategories()); + if (Build.VERSION.SDK_INT >= 11) { + categories.addAll(db.getCategories()); + } else { + List categories = db.getCategories(); + for (String category : db.getCategories()) { + categories.add(category); + } + } if (currentCategory == null) currentCategory = categoryWhatsNew; diff --git a/src/org/fdroid/fdroid/DB.java b/src/org/fdroid/fdroid/DB.java index a542a4b3b..85153e07c 100644 --- a/src/org/fdroid/fdroid/DB.java +++ b/src/org/fdroid/fdroid/DB.java @@ -634,13 +634,10 @@ public class DB { null, null, null, null, "categories", null); c.moveToFirst(); while (!c.isAfterLast()) { - Log.d("FDroid", "== CATEGS "+c.getString(0)); CommaSeparatedList categories = CommaSeparatedList .make(c.getString(0)); for (String category : categories) { - Log.d("FDroid", "== CATEG "+category); if (!result.contains(category)) { - Log.d("FDroid", "== CATEG ADDED "+category); result.add(category); } }