diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 8bb7ea5..ee6c8f7 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="2" + android:versionName="0.1.1" > diff --git a/src/com/github/nutomic/controldlna/FileArrayAdapter.java b/src/com/github/nutomic/controldlna/FileArrayAdapter.java index b7c3542..93ec4f5 100644 --- a/src/com/github/nutomic/controldlna/FileArrayAdapter.java +++ b/src/com/github/nutomic/controldlna/FileArrayAdapter.java @@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package com.github.nutomic.controldlna; import java.util.Comparator; +import java.util.List; import org.teleal.cling.support.model.DIDLObject; import org.teleal.cling.support.model.container.Container; @@ -87,5 +88,13 @@ public class FileArrayAdapter extends ArrayAdapter { } return convertView; } + + /** + * Replacement for addAll, which is not implemented on lower API levels. + */ + public void add(List playlist) { + for (DIDLObject d : playlist) + add(d); + } } diff --git a/src/com/github/nutomic/controldlna/RendererFragment.java b/src/com/github/nutomic/controldlna/RendererFragment.java index 46bf9b8..63f9e3b 100644 --- a/src/com/github/nutomic/controldlna/RendererFragment.java +++ b/src/com/github/nutomic/controldlna/RendererFragment.java @@ -246,7 +246,7 @@ public class RendererFragment extends Fragment implements */ public void setPlaylist(List playlist, int start) { mPlaylistAdapter.clear(); - mPlaylistAdapter.addAll(playlist); + mPlaylistAdapter.add(playlist); mPlayService.getService().setPlaylist(playlist, start); } @@ -366,7 +366,7 @@ public class RendererFragment extends Fragment implements mUpnpService.getControlPoint().execute(mSubscriptionCallback); } mPlaylistAdapter.clear(); - mPlaylistAdapter.addAll(mPlayService.getService().getPlaylist()); + mPlaylistAdapter.add(mPlayService.getService().getPlaylist()); mListView.setAdapter(mPlaylistAdapter); }