[Android Apps and Games] kevin@TeslaCoil:
Minor bug report,

If the Log is empty and the user clicks on the "Log" tab then Superuser 2.3.1 force closes. After the log is populated it seems to behave fine.

E/AndroidRuntime( 722): java.lang.RuntimeException: Unable to resume activity {com.noshufou.android.su/com.noshufou.android.su.LogActivity}: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
E/AndroidRuntime( 722):	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3128)
E/AndroidRuntime( 722):	at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:138)
E/AndroidRuntime( 722):	at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
E/AndroidRuntime( 722):	at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:651)
E/AndroidRuntime( 722):	at android.widget.TabHost.setCurrentTab(TabHost.java:323)
E/AndroidRuntime( 722):	at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:129)
E/AndroidRuntime( 722):	at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:453)
E/AndroidRuntime( 722):	at android.view.View.performClick(View.java:2408)
E/AndroidRuntime( 722):	at android.view.View$PerformClick.run(View.java:8816)
E/AndroidRuntime( 722):	at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 722):	at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 722):	at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 722):	at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 722):	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 722):	at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 722):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 722):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 722):	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 722): Caused by: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
E/AndroidRuntime( 722):	at android.database.AbstractCursor.checkPosition(AbstractCursor.java:580)
E/AndroidRuntime( 722):	at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:214)
E/AndroidRuntime( 722):	at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:99)
E/AndroidRuntime( 722):	at com.noshufou.android.su.DateIndexer.<init>(DateIndexer.java:29)
E/AndroidRuntime( 722):	at com.noshufou.android.su.LogActivity$LogAdapter.updateIndexer(LogActivity.java:193)
E/AndroidRuntime( 722):	at com.noshufou.android.su.LogActivity$LogAdapter.changeCursor(LogActivity.java:184)
E/AndroidRuntime( 722):	at com.noshufou.android.su.LogActivity.refreshList(LogActivity.java:82)
E/AndroidRuntime( 722):	at com.noshufou.android.su.LogActivity.onResume(LogActivity.java:50)
E/AndroidRuntime( 722):	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
E/AndroidRuntime( 722):	at android.app.Activity.performResume(Activity.java:3823)
E/AndroidRuntime( 722):	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)
E/AndroidRuntime( 722):	... 17 more
W/ActivityManager( 90): Force finishing activity com.noshufou.android.su/.Su