fix issue with api29
Because '*' is not a valid columns (yeah android...), we need to supply an existing column to count things.
This commit is contained in:
parent
adc0cedf44
commit
2b9466575f
@ -336,7 +336,7 @@ public class MediaScanner implements Handler.Callback {
|
||||
private void guessQuickScanPlan() {
|
||||
int lastSeenDbSize = MediaLibrary.getPreferences(mContext)._nativeLibraryCount;
|
||||
String selection = MediaStore.Audio.Media.IS_MUSIC + "!= 0";
|
||||
String[] projection = { "COUNT(*)" };
|
||||
String[] projection = { "COUNT("+MediaStore.Audio.Media.IS_MUSIC+")" };
|
||||
Cursor cursor = null;
|
||||
try {
|
||||
cursor = mContext.getContentResolver().query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, projection, selection, null, null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user