Use most backwards-compatible overload for query

This commit is contained in:
Bartłomiej Dach 2020-12-14 20:01:28 +01:00
parent 38e0b4e64d
commit a323c5ce58
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ protected override void OnNewIntent(Intent intent)
private void handleImportFromUri(Uri uri)
{
var cursor = ContentResolver?.Query(uri, new[] { OpenableColumns.DisplayName }, null, null);
// there are more performant overloads of this method, but this one is the most backwards-compatible
// (dates back to API 1).
var cursor = ContentResolver?.Query(uri, null, null, null, null);
if (cursor == null)
return;