Created
April 9, 2015 22:52
-
-
Save fregmented/40f054089a669fca7337 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private synchronized void buildListsByPlaylist(){ | |
ConcurrentMap<String, List<MediaMetadata>> newMusicListByPlaylist = new ConcurrentHashMap<>(); | |
for(MutableMediaMetadata m : mMusicListById.values()){ | |
String playlist = m.metadata.getString(CUSTOM_METADATA_PLAYLIST_NAME); | |
List<MediaMetadata> list = newMusicListByPlaylist.get(playlist); | |
Log.e("buildListsByPlaylist", playlist); | |
if(list == null){ | |
list = new ArrayList<>(); | |
newMusicListByPlaylist.put(playlist, list); | |
} | |
list.add(m.metadata); | |
} | |
mMusicListByPlaylist = newMusicListByPlaylist; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment