title: MediaStore select query returns only one row
body: <p>I'm trying to develop music player, I've made a loader and adapter for my data retreiving from mediastore, but when I call query from my app it only returns one row, I don't know wat's wrong with my code, would u help me fixing that problem?</p>
  
  <p>That's my loader which should return a list I'll use in another place</p>
  
  <pre><code>public static List&lt;Song&gt; getAllArtistSongs(Context context, long artist_id){
      List&lt;Song&gt; ArtistSongList = new ArrayList&lt;&gt;();
      Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
      String[] projection = new String[]{
              "_id",
              "title",
              "album_id",
              "album",
              "artist",
              "duration",
              "track"
      };
      String sortorder = MediaStore.Audio.Media.DEFAULT_SORT_ORDER;
      String selection = "is_music=1 and artist_id="+artist_id;
  
      Cursor cursor = context.getContentResolver().query(uri, projection, selection, null, sortorder);
      assert cursor != null;
      if (cursor.moveToFirst()) {
              do {
                  int trackNumber = cursor.getInt(6);
                  while (trackNumber &gt;= 1000) {
                      trackNumber -= 1000;
                  }
                  Long id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media._ID));
                  String title = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE));
                  Long albumid = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM_ID));
                  String albumname = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM));
                  String artistname = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST));
                  int duration = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION));
                  ArtistSongList.add(new Song(id, title, albumid, albumname, artist_id, artistname, duration, trackNumber));
              } while (cursor.moveToNext());
          cursor.close();
      }
      return ArtistSongList;
  }
  </code></pre>
  
  <p>And this is the adapter which I use to bind to a recyclerview</p>
  
  <pre><code>public void onBindViewHolder(@NonNull VH holder, int position) {
      Song song = artistSongList.get(position);
          if(song!=null){
              holder.ttv.setText(song.title);
              holder.dtv.setText(song.artistName);
              int trackN = song.trackNumber;
              if(trackN==0){
                  holder.ntv.setText("_");
              }else holder.ntv.setText(String.valueOf(trackN));
          }
  }
  </code></pre>
  
  <p>And this is where I call the query func</p>
  
  <pre><code>private void setupAlbumList() {
      System.out.println(artistId);
      songList = ArtistSongLoader.getAllArtistSongs(getActivity(), artistId);
      adapter = new ArtistSongAdapter(getActivity(), songList);
      recy.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
      recy.setAdapter(new ArtistSongAdapter(getActivity(), songList));
  }
  </code></pre>
  
  <p>Thx in advance for helping</p>