Skip to content

Commit

Permalink
Fix null ctor for service
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Aug 10, 2018
1 parent 3f9267b commit 78219ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
6 changes: 3 additions & 3 deletions ExoPlayer.Core/Transforms/Metadata.xml
Expand Up @@ -135,9 +135,9 @@
<remove-node path="/api/package[@name='com.google.android.exoplayer2.source.ads']/interface[@name='AdsLoader']/method[@name='handlePrepareError' and count(parameter)=3 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='java.io.IOException']]" />
<remove-node path="/api/package[@name='com.google.android.exoplayer2.source.ads']/interface[@name='AdsLoader']/method[@name='setSupportedContentTypes' and count(parameter)=1 and parameter[1][@type='int...']]" />

<!--Implemented in the demo application because there is currently no way to implement the DownloadService as it requires a parameterless constructor.-->
<!--<remove-node path="/api/package[@name='com.google.android.exoplayer2.offline']/class[@name='DownloadService']" />-->
<!--Make visible to c#-->
<attr name="visibility" path="/api/package[@name='com.google.android.exoplayer2.offline']/class[@name='DownloadService.ForegroundNotificationUpdater']">public</attr>

<!-- Cannot convert IList to List<T>-->
<attr path="/api/package[@name='com.google.android.exoplayer2.offline']/class[@name='SegmentDownloadAction']/field[@name='keys']" name="type">Java.Util.IList</attr>
</metadata>
11 changes: 2 additions & 9 deletions Samples/Main/DemoDownloadService.cs
Expand Up @@ -26,6 +26,7 @@
using Utils = Com.Google.Android.Exoplayer2.Util.Util;
using Android.Runtime;
using System;
using Java.Interop;

namespace Com.Google.Android.Exoplayer2.Demo
{
Expand All @@ -38,6 +39,7 @@ public class DemoDownloadService : DownloadService
private static readonly int JOB_ID = 1;
public static readonly int FOREGROUND_NOTIFICATION_ID = 1;

[Export(SuperArgumentsString = "1, 1000, \"download_channel\", 2131427508")]
public DemoDownloadService() : this (FOREGROUND_NOTIFICATION_ID, DefaultForegroundNotificationUpdateInterval, CHANNEL_ID, Resource.String.exo_download_notification_channel_name)
{
}
Expand All @@ -58,15 +60,6 @@ protected DemoDownloadService(int foregroundNotificationId, long foregroundNotif
{
}

/*
public DemoDownloadService()
{
//this.foregroundNotificationUpdater = DownloadService.ForegroundNotificationUpdater(foregroundNotificationId, foregroundNotificationUpdateInterval);
Log.Debug("DemoDownloadService", "Service created.");
//Initialize(FOREGROUND_NOTIFICATION_ID, DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL, CHANNEL_ID, Resource.String.exo_download_notification_channel_name);
}*/

protected override Offline.DownloadManager DownloadManager
{
get
Expand Down
6 changes: 2 additions & 4 deletions Samples/Main/ExoPlayer.Demo.csproj
Expand Up @@ -37,17 +37,15 @@
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<AndroidSupportedAbis>armeabi;armeabi-v7a;x86</AndroidSupportedAbis>
<MandroidI18n>
</MandroidI18n>
<Debugger>Xamarin</Debugger>
<DevInstrumentationEnabled>True</DevInstrumentationEnabled>
<AotAssemblies>false</AotAssemblies>
<EnableLLVM>false</EnableLLVM>
<BundleAssemblies>false</BundleAssemblies>
<AndroidUseSharedRuntime>true</AndroidUseSharedRuntime>
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<AndroidEnableMultiDex>true</AndroidEnableMultiDex>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
Expand Down

0 comments on commit 78219ee

Please sign in to comment.