public override void changeCursor(android.database.Cursor c) { if (mClosed) { android.util.Log.w(LOG_TAG, "Tried to change cursor after adapter was closed."); if (c != null) { c.close(); } return; } try { base.changeCursor(c); if (c != null) { mText1Col = c.getColumnIndex(android.app.SearchManager.SUGGEST_COLUMN_TEXT_1); mText2Col = c.getColumnIndex(android.app.SearchManager.SUGGEST_COLUMN_TEXT_2); mText2UrlCol = c.getColumnIndex(android.app.SearchManager.SUGGEST_COLUMN_TEXT_2_URL ); mIconName1Col = c.getColumnIndex(android.app.SearchManager.SUGGEST_COLUMN_ICON_1); mIconName2Col = c.getColumnIndex(android.app.SearchManager.SUGGEST_COLUMN_ICON_2); mFlagsCol = c.getColumnIndex(android.app.SearchManager.SUGGEST_COLUMN_FLAGS); } } catch (System.Exception e) { android.util.Log.e(LOG_TAG, "error changing cursor and caching columns", e); } }
public virtual void changeCursor(android.database.Cursor cursor) { android.database.Cursor old = swapCursor(cursor); if (old != null) { old.close(); } }