diff --git a/example/src/edu/mit/mobile/android/content/example/SimpleContentProviderExample.java b/example/src/edu/mit/mobile/android/content/example/SimpleContentProviderExample.java index ed12696..a61a45f 100644 --- a/example/src/edu/mit/mobile/android/content/example/SimpleContentProviderExample.java +++ b/example/src/edu/mit/mobile/android/content/example/SimpleContentProviderExample.java @@ -154,7 +154,11 @@ private void loadContent(Uri data) { // none of the cursors need to be closed, as managedQuery will take care of this. Note: // in later versions of Android, one should use a CursorLoader instead. final Cursor c = managedQuery(data, PROJECTION, null, null, SORT_ORDER); - mListAdapter.swapCursor(c); + if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { + mListAdapter.changeCursor(c); + } else { + mListAdapter.swapCursor(c); + } // this exception is triggered when there's an invalid filter. } catch (final IllegalArgumentException e) {