Crash when resuming F-Droid and SearchActivity is shown
It doesn't happen every time, but if you: * Perform a search * Leave the search results showing * Touch the home button on my phone to close F-Droid (although it is most likely still running in the background) * Open the list of running applications * Touch F-Droid to re-open it Sometimes it crashes with the exception shown below. This was on my Nexus 4 CM10.2. ``` W/dalvikvm( 3076): threadid=1: thread exiting with uncaught exception (group=0xb0d38b20) E/AndroidRuntime( 3076): FATAL EXCEPTION: main E/AndroidRuntime( 3076): Process: org.fdroid.fdroid, PID: 3076 E/AndroidRuntime( 3076): java.lang.RuntimeException: Unable to resume activity {org.fdroid.fdroid/org.fdroid.fdroid.SearchResults}: java.lang.IllegalStateException: trying to requery an already closed cursor android.content.ContentResolver$CursorWrapperInner@b13bd9f0 E/AndroidRuntime( 3076): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2788) E/AndroidRuntime( 3076): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2817) E/AndroidRuntime( 3076): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238) E/AndroidRuntime( 3076): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 3076): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime( 3076): at android.app.ActivityThread.main(ActivityThread.java:5017) E/AndroidRuntime( 3076): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3076): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 3076): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) E/AndroidRuntime( 3076): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) E/AndroidRuntime( 3076): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 3076): Caused by: java.lang.IllegalStateException: trying to requery an already closed cursor android.content.ContentResolver$CursorWrapperInner@b13bd9f0 E/AndroidRuntime( 3076): at android.app.Activity.performRestart(Activity.java:5279) E/AndroidRuntime( 3076): at android.app.Activity.performResume(Activity.java:5302) E/AndroidRuntime( 3076): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2778) E/AndroidRuntime( 3076): ... 10 more W/ActivityManager( 1163): Force finishing activity org.fdroid.fdroid/.SearchResults W/ActivityManager( 1163): Activity pause timeout for ActivityRecord{b1406b90 u0 org.fdroid.fdroid/.SearchResults t14 f} ```
issue