Code example for CursorLoader

Methods: loadInBackground, setSelectionArgs

0
 
    protected abstract Bundle getSession(Bundle sessionData, String more);
 
    private Cursor newCursor() {
        long sessionId = CursorExtras.getSessionId(sessionData);
        setSelectionArgs(Array.of(sessionId));
        Cursor c = super.loadInBackground();
        return c != null ? new CursorExtrasWrapper(c, sessionData) : null;
    } 
}