Skip to content

Instantly share code, notes, and snippets.

@LouisCAD
Last active January 4, 2017 16:21
Show Gist options
  • Save LouisCAD/9bb135895e9e3ac8e478aef20fcd5cac to your computer and use it in GitHub Desktop.
Save LouisCAD/9bb135895e9e3ac8e478aef20fcd5cac to your computer and use it in GitHub Desktop.
import android.annotation.SuppressLint
import android.content.ContentResolver
import android.database.Cursor
import android.net.Uri
/**
* @see ContentResolver.query
*/
@SuppressLint("Recycle")
@Suppress("NOTHING_TO_INLINE")
inline fun ContentResolver.query(uri: Uri,
projection: Array<out String>? = null,
selection: String? = null,
selectionArgs: Array<out String>? = null,
sortOrder: String? = null): Cursor? {
return query(uri, projection, selection, selectionArgs, sortOrder)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment