Fix crash.

This commit is contained in:
dosiecki 2014-11-18 00:34:35 -08:00 committed by Samuel Clay
parent 2a58405800
commit 9419a0ebd5

View file

@ -88,6 +88,7 @@ public class FolderListFragment extends NbFragment implements OnGroupClickListen
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
try {
switch (loader.getId()) {
case SOCIALFEEDS_LOADER:
adapter.setSocialFeedCursor(cursor);
@ -105,6 +106,11 @@ public class FolderListFragment extends NbFragment implements OnGroupClickListen
throw new IllegalArgumentException("unknown loader created");
}
checkOpenFolderPreferences();
} catch (Exception e) {
// for complex folder sets, these ops can take so long that they butt heads
// with the destruction of the fragment and adapter. crashes can ensue.
Log.w(this.getClass().getName(), "failed up update fragment state", e);
}
}
@Override