Don't init cursors in the main thread
@pserwlo and I noticed this and discussed it on IRC a while ago. I'm opening this issue so that we don't forget.
Java complains about the deprecated constructors:
/home/mvdan/git/fcl/F-Droid/src/org/fdroid/fdroid/views/AppListAdapter.java:25: warning: [deprecation] CursorAdapter(Context,Cursor) in CursorAdapter has been deprecated
super(context, c);
^
/home/mvdan/git/fcl/F-Droid/src/org/fdroid/fdroid/views/RepoAdapter.java:36: warning: [deprecation] CursorAdapter(Context,Cursor) in CursorAdapter has been deprecated
super(context, c);
^
And StrictMode also complains about the cursors being initialized in the main thread, and tells you how much time the freezes of the UI (main) thread take.
Info on how to fix this with a LoaderManager: https://developer.android.com/reference/android/widget/CursorAdapter.html#CursorAdapter(android.content.Context, android.database.Cursor)