From 97551357ec086fd8b1f7877c16bddb60c15bf2bc Mon Sep 17 00:00:00 2001 From: Adam Baker Date: Sun, 3 Jan 2016 13:36:12 +0000 Subject: [PATCH] Update cling version --- build.gradle | 13 +++++- src/main/AndroidManifest.xml | 5 ++- .../nutomic/controldlna/gui/MainActivity.java | 2 +- .../controldlna/gui/RouteFragment.java | 2 +- .../controldlna/gui/ServerFragment.java | 26 +++++------ .../mediarouter/MediaRouterPlayService.java | 10 ++--- .../controldlna/upnp/RemotePlayService.java | 30 ++++++------- .../upnp/RemotePlayServiceBinder.java | 44 +++++++++---------- .../utility/DeviceArrayAdapter.java | 10 ++--- .../controldlna/utility/FileArrayAdapter.java | 14 +++--- 10 files changed, 83 insertions(+), 73 deletions(-) diff --git a/build.gradle b/build.gradle index c6999cb..4c0530e 100644 --- a/build.gradle +++ b/build.gradle @@ -22,8 +22,12 @@ repositories { dependencies { compile 'com.android.support:appcompat-v7:19.1.+' compile 'com.android.support:mediarouter-v7:19.1.+' - compile 'org.teleal.cling:cling-core:1.0.5+' - compile 'org.teleal.cling:cling-support:1.0.5+' + compile 'org.fourthline.cling:cling-core:2.1.0' + compile 'org.fourthline.cling:cling-support:2.1.0' + compile 'org.eclipse.jetty:jetty-server:8.1.8.v20121106' + compile 'org.eclipse.jetty:jetty-servlet:8.1.8.v20121106' + compile 'org.eclipse.jetty:jetty-client:8.1.8.v20121106' + compile 'org.slf4j:slf4j-jdk14:1.6.1' } android { @@ -35,6 +39,11 @@ android { disable 'InvalidPackage' } + packagingOptions { + exclude 'META-INF/beans.xml' + exclude 'about.html' + } + signingConfigs { release { // Android Studio does not pass environment variables. diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 99ea882..96b9fd1 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -12,9 +12,10 @@ + - + diff --git a/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java b/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java index f7513dd..b33d47d 100644 --- a/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java +++ b/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java @@ -49,7 +49,7 @@ import android.view.MenuItem; import com.github.nutomic.controldlna.R; -import org.teleal.cling.support.model.item.Item; +import org.fourthline.cling.support.model.item.Item; import java.util.List; diff --git a/src/main/java/com/github/nutomic/controldlna/gui/RouteFragment.java b/src/main/java/com/github/nutomic/controldlna/gui/RouteFragment.java index c8d171c..698dfe0 100644 --- a/src/main/java/com/github/nutomic/controldlna/gui/RouteFragment.java +++ b/src/main/java/com/github/nutomic/controldlna/gui/RouteFragment.java @@ -68,7 +68,7 @@ import com.github.nutomic.controldlna.mediarouter.MediaRouterPlayServiceBinder; import com.github.nutomic.controldlna.utility.FileArrayAdapter; import com.github.nutomic.controldlna.utility.RouteAdapter; -import org.teleal.cling.support.model.item.Item; +import org.fourthline.cling.support.model.item.Item; import java.util.List; diff --git a/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java b/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java index 7fb3a6a..091e31b 100644 --- a/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java +++ b/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java @@ -56,19 +56,19 @@ import com.github.nutomic.controldlna.gui.MainActivity.OnBackPressedListener; import com.github.nutomic.controldlna.utility.DeviceArrayAdapter; import com.github.nutomic.controldlna.utility.FileArrayAdapter; -import org.teleal.cling.android.AndroidUpnpService; -import org.teleal.cling.android.AndroidUpnpServiceImpl; -import org.teleal.cling.model.action.ActionInvocation; -import org.teleal.cling.model.message.UpnpResponse; -import org.teleal.cling.model.meta.Device; -import org.teleal.cling.model.meta.Service; -import org.teleal.cling.model.types.ServiceType; -import org.teleal.cling.model.types.UDN; -import org.teleal.cling.support.contentdirectory.callback.Browse; -import org.teleal.cling.support.model.BrowseFlag; -import org.teleal.cling.support.model.DIDLContent; -import org.teleal.cling.support.model.container.Container; -import org.teleal.cling.support.model.item.Item; +import org.fourthline.cling.android.AndroidUpnpService; +import org.fourthline.cling.android.AndroidUpnpServiceImpl; +import org.fourthline.cling.model.action.ActionInvocation; +import org.fourthline.cling.model.message.UpnpResponse; +import org.fourthline.cling.model.meta.Device; +import org.fourthline.cling.model.meta.Service; +import org.fourthline.cling.model.types.ServiceType; +import org.fourthline.cling.model.types.UDN; +import org.fourthline.cling.support.contentdirectory.callback.Browse; +import org.fourthline.cling.support.model.BrowseFlag; +import org.fourthline.cling.support.model.DIDLContent; +import org.fourthline.cling.support.model.container.Container; +import org.fourthline.cling.support.model.item.Item; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/github/nutomic/controldlna/mediarouter/MediaRouterPlayService.java b/src/main/java/com/github/nutomic/controldlna/mediarouter/MediaRouterPlayService.java index e7cb6aa..94b7548 100644 --- a/src/main/java/com/github/nutomic/controldlna/mediarouter/MediaRouterPlayService.java +++ b/src/main/java/com/github/nutomic/controldlna/mediarouter/MediaRouterPlayService.java @@ -55,11 +55,11 @@ import com.github.nutomic.controldlna.gui.PreferencesActivity; import com.github.nutomic.controldlna.gui.RouteFragment; import com.github.nutomic.controldlna.utility.LoadImageTask; -import org.teleal.cling.support.contentdirectory.DIDLParser; -import org.teleal.cling.support.model.DIDLContent; -import org.teleal.cling.support.model.DIDLObject; -import org.teleal.cling.support.model.item.Item; -import org.teleal.cling.support.model.item.MusicTrack; +import org.fourthline.cling.support.contentdirectory.DIDLParser; +import org.fourthline.cling.support.model.DIDLContent; +import org.fourthline.cling.support.model.DIDLObject; +import org.fourthline.cling.support.model.item.Item; +import org.fourthline.cling.support.model.item.MusicTrack; import java.lang.ref.WeakReference; import java.util.ArrayList; diff --git a/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayService.java b/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayService.java index 48f187f..914a0cd 100644 --- a/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayService.java +++ b/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayService.java @@ -45,19 +45,19 @@ import android.util.Log; import com.github.nutomic.controldlna.R; -import org.teleal.cling.android.AndroidUpnpService; -import org.teleal.cling.android.AndroidUpnpServiceImpl; -import org.teleal.cling.model.action.ActionInvocation; -import org.teleal.cling.model.message.UpnpResponse; -import org.teleal.cling.model.meta.Device; -import org.teleal.cling.model.meta.LocalDevice; -import org.teleal.cling.model.meta.RemoteDevice; -import org.teleal.cling.model.meta.StateVariableAllowedValueRange; -import org.teleal.cling.model.types.ServiceType; -import org.teleal.cling.model.types.UDN; -import org.teleal.cling.registry.Registry; -import org.teleal.cling.registry.RegistryListener; -import org.teleal.cling.support.renderingcontrol.callback.GetVolume; +import org.fourthline.cling.android.AndroidUpnpService; +import org.fourthline.cling.android.AndroidUpnpServiceImpl; +import org.fourthline.cling.model.action.ActionInvocation; +import org.fourthline.cling.model.message.UpnpResponse; +import org.fourthline.cling.model.meta.Device; +import org.fourthline.cling.model.meta.LocalDevice; +import org.fourthline.cling.model.meta.RemoteDevice; +import org.fourthline.cling.model.meta.StateVariableAllowedValueRange; +import org.fourthline.cling.model.types.ServiceType; +import org.fourthline.cling.model.types.UDN; +import org.fourthline.cling.registry.Registry; +import org.fourthline.cling.registry.RegistryListener; +import org.fourthline.cling.support.renderingcontrol.callback.GetVolume; import java.util.Map.Entry; import java.util.WeakHashMap; @@ -208,7 +208,7 @@ public class RemotePlayService extends Service implements RegistryListener { /** * Returns a device service by name for direct queries. */ - org.teleal.cling.model.meta.Service getService( + org.fourthline.cling.model.meta.Service getService( Device device, String name) { return device.findService(new ServiceType("schemas-upnp-org", name)); } @@ -220,7 +220,7 @@ public class RemotePlayService extends Service implements RegistryListener { if (mDevices.containsValue(device)) return; - final org.teleal.cling.model.meta.Service rc = getService(device, "RenderingControl"); + final org.fourthline.cling.model.meta.Service rc = getService(device, "RenderingControl"); if (rc == null || mListener == null) return; diff --git a/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayServiceBinder.java b/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayServiceBinder.java index 9b05106..46927cc 100644 --- a/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayServiceBinder.java +++ b/src/main/java/com/github/nutomic/controldlna/upnp/RemotePlayServiceBinder.java @@ -33,26 +33,26 @@ import java.util.Date; import java.util.Map; import java.util.TimeZone; -import org.teleal.cling.controlpoint.SubscriptionCallback; -import org.teleal.cling.model.action.ActionInvocation; -import org.teleal.cling.model.gena.CancelReason; -import org.teleal.cling.model.gena.GENASubscription; -import org.teleal.cling.model.message.UpnpResponse; -import org.teleal.cling.model.meta.Device; -import org.teleal.cling.model.state.StateVariableValue; -import org.teleal.cling.model.types.ServiceType; -import org.teleal.cling.support.avtransport.callback.GetPositionInfo; -import org.teleal.cling.support.avtransport.callback.Pause; -import org.teleal.cling.support.avtransport.callback.Play; -import org.teleal.cling.support.avtransport.callback.Seek; -import org.teleal.cling.support.avtransport.callback.SetAVTransportURI; -import org.teleal.cling.support.avtransport.callback.Stop; -import org.teleal.cling.support.avtransport.lastchange.AVTransportLastChangeParser; -import org.teleal.cling.support.avtransport.lastchange.AVTransportVariable; -import org.teleal.cling.support.lastchange.LastChange; -import org.teleal.cling.support.model.PositionInfo; -import org.teleal.cling.support.model.SeekMode; -import org.teleal.cling.support.renderingcontrol.callback.SetVolume; +import org.fourthline.cling.controlpoint.SubscriptionCallback; +import org.fourthline.cling.model.action.ActionInvocation; +import org.fourthline.cling.model.gena.CancelReason; +import org.fourthline.cling.model.gena.GENASubscription; +import org.fourthline.cling.model.message.UpnpResponse; +import org.fourthline.cling.model.meta.Device; +import org.fourthline.cling.model.state.StateVariableValue; +import org.fourthline.cling.model.types.ServiceType; +import org.fourthline.cling.support.avtransport.callback.GetPositionInfo; +import org.fourthline.cling.support.avtransport.callback.Pause; +import org.fourthline.cling.support.avtransport.callback.Play; +import org.fourthline.cling.support.avtransport.callback.Seek; +import org.fourthline.cling.support.avtransport.callback.SetAVTransportURI; +import org.fourthline.cling.support.avtransport.callback.Stop; +import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser; +import org.fourthline.cling.support.avtransport.lastchange.AVTransportVariable; +import org.fourthline.cling.support.lastchange.LastChange; +import org.fourthline.cling.support.model.PositionInfo; +import org.fourthline.cling.support.model.SeekMode; +import org.fourthline.cling.support.renderingcontrol.callback.SetVolume; import android.annotation.SuppressLint; import android.os.Message; @@ -218,7 +218,7 @@ public class RemotePlayServiceBinder extends IRemotePlayService.Stub { @SuppressWarnings("rawtypes") @Override public void failure(ActionInvocation invocation, - org.teleal.cling.model.message.UpnpResponse operation, + org.fourthline.cling.model.message.UpnpResponse operation, String defaultMessage) { Log.w(TAG, "Stop failed: " + defaultMessage); mRps.sendError("Stop failed: " + defaultMessage); @@ -320,7 +320,7 @@ public class RemotePlayServiceBinder extends IRemotePlayService.Stub { @SuppressWarnings("rawtypes") @Override public void failure(ActionInvocation invocation, - org.teleal.cling.model.message.UpnpResponse operation, + org.fourthline.cling.model.message.UpnpResponse operation, String defaultMessage) { Log.w(TAG, "Stop failed: " + defaultMessage); mRps.sendError("Stop failed: " + defaultMessage); diff --git a/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java b/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java index cc12c1a..bfe0905 100644 --- a/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java +++ b/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java @@ -38,11 +38,11 @@ import android.widget.TextView; import com.github.nutomic.controldlna.R; -import org.teleal.cling.model.meta.Device; -import org.teleal.cling.model.meta.LocalDevice; -import org.teleal.cling.model.meta.RemoteDevice; -import org.teleal.cling.registry.Registry; -import org.teleal.cling.registry.RegistryListener; +import org.fourthline.cling.model.meta.Device; +import org.fourthline.cling.model.meta.LocalDevice; +import org.fourthline.cling.model.meta.RemoteDevice; +import org.fourthline.cling.registry.Registry; +import org.fourthline.cling.registry.RegistryListener; import java.net.URI; import java.net.URISyntaxException; diff --git a/src/main/java/com/github/nutomic/controldlna/utility/FileArrayAdapter.java b/src/main/java/com/github/nutomic/controldlna/utility/FileArrayAdapter.java index c347448..4b7e264 100644 --- a/src/main/java/com/github/nutomic/controldlna/utility/FileArrayAdapter.java +++ b/src/main/java/com/github/nutomic/controldlna/utility/FileArrayAdapter.java @@ -30,13 +30,13 @@ package com.github.nutomic.controldlna.utility; import java.net.URI; import java.util.List; -import org.teleal.cling.support.model.DIDLObject; -import org.teleal.cling.support.model.item.AudioItem; -import org.teleal.cling.support.model.item.ImageItem; -import org.teleal.cling.support.model.item.Item; -import org.teleal.cling.support.model.item.PlaylistItem; -import org.teleal.cling.support.model.item.VideoItem; -import org.teleal.cling.support.model.item.MusicTrack; +import org.fourthline.cling.support.model.DIDLObject; +import org.fourthline.cling.support.model.item.AudioItem; +import org.fourthline.cling.support.model.item.ImageItem; +import org.fourthline.cling.support.model.item.Item; +import org.fourthline.cling.support.model.item.PlaylistItem; +import org.fourthline.cling.support.model.item.VideoItem; +import org.fourthline.cling.support.model.item.MusicTrack; import android.content.Context; import android.view.LayoutInflater;