1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 10:34:07 +00:00

fdroid builds without Google and Hockey services

This commit is contained in:
Kyle Spearrin
2018-01-10 09:28:30 -05:00
parent 5521892736
commit 98d4fef0ee
15 changed files with 122 additions and 8 deletions

View File

@@ -8,7 +8,7 @@
<Configurations>Debug;Release;FDroid</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='FDroid|netstandard2.0|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'FDroid|AnyCPU'">
<DefineConstants>TRACE;FDROID;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>
@@ -21,7 +21,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="HockeySDK.Xamarin" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="PCLCrypto" Version="2.0.147" />
<PackageReference Include="Plugin.Fingerprint" Version="1.4.6-beta4" />
@@ -36,6 +35,10 @@
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.1.47" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)|$(Platform)' != 'FDroid|AnyCPU'">
<PackageReference Include="HockeySDK.Xamarin" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\AppResources.cs.Designer.cs">
<DependentUpon>AppResources.cs.resx</DependentUpon>

View File

@@ -112,7 +112,9 @@ namespace Bit.App.Pages
{
websiteIconsTable, WebsiteIconsLabel,
totpTable, CopyTotpLabel,
#if !FDROID
analyticsTable, AnalyticsLabel
#endif
},
Spacing = 0
};

View File

@@ -0,0 +1,36 @@
using System;
using Bit.App.Abstractions;
namespace Bit.Android.Services
{
public class NoopGoogleAnalyticsService : IGoogleAnalyticsService
{
public void TrackAppEvent(string eventName, string label = null)
{
}
public void TrackExtensionEvent(string eventName, string label = null)
{
}
public void TrackEvent(string category, string eventName, string label = null)
{
}
public void TrackException(string message, bool fatal)
{
}
public void TrackPage(string pageName)
{
}
public void Dispatch(Action completionHandler = null)
{
}
public void SetAppOptOut(bool optOut)
{
}
}
}

View File

@@ -0,0 +1,29 @@
using Newtonsoft.Json.Linq;
using Bit.App.Abstractions;
namespace Bit.App.Services
{
public class NoopPushNotificationListener : IPushNotificationListener
{
public void OnMessage(JObject value, string deviceType)
{
}
public void OnRegistered(string token, string deviceType)
{
}
public void OnUnregistered(string deviceType)
{
}
public void OnError(string message, string deviceType)
{
}
public bool ShouldShowNotification()
{
return false;
}
}
}

View File

@@ -0,0 +1,17 @@
using Bit.App.Abstractions;
namespace Bit.App.Services
{
public class NoopPushNotificationService : IPushNotificationService
{
public string Token => null;
public void Register()
{
}
public void Unregister()
{
}
}
}

View File

@@ -1,3 +1,4 @@
#if !FDROID
using System.Diagnostics;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -195,3 +196,4 @@ namespace Bit.App.Services
}
}
}
#endif