5d9d03a023
...Invalid index 0, size is 0 at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326) It looks like if an arrow key is dispatched between the time the list view is told its data set has changed and it does the resulting layout pass, we could try to move the position to a now invalid index. This may prevent that from happening. Also put in a better error message if saving state of a fragment whose target is no longer in the fragment manager. And fix a bug in PackageManager where we could return a null from queryIntentActivities(). And add a new API to find out whether a fragment is being removed, to help fix issue #3306021: NPE at android.app.AlertDialog.getDefaultDialogTheme(AlertDialog.java) Next, for new HC apps we can delay committing data to storage until the activity is stopped. Finally, use the new multi-threaded AyncTask executor in a few places, so we don't have worked blocked by long-running tasks from the application. Change-Id: I27b2aafedf2e1bf3a2316309889613fa539760f3