mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-27 12:26:31 +01:00
update libs
This commit is contained in:
parent
b2f40c7af0
commit
f680b1e856
@ -871,7 +871,7 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="XLabs.IoC.SimpleInjector" Version="2.0.5782" />
|
<PackageReference Include="XLabs.IoC.SimpleInjector" Version="2.0.5782" />
|
||||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.2" />
|
<PackageReference Include="Portable.BouncyCastle" Version="1.8.2" />
|
||||||
<PackageReference Include="Plugin.CurrentActivity" Version="1.0.1" />
|
<PackageReference Include="Plugin.CurrentActivity" Version="2.1.0.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidResource Include="Resources\drawable\bottom_nav_bg.xml" />
|
<AndroidResource Include="Resources\drawable\bottom_nav_bg.xml" />
|
||||||
|
@ -13,7 +13,6 @@ using Plugin.Fingerprint;
|
|||||||
using Plugin.Settings;
|
using Plugin.Settings;
|
||||||
using XLabs.Ioc;
|
using XLabs.Ioc;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using FFImageLoading.Forms.Droid;
|
|
||||||
using XLabs.Ioc.SimpleInjectorContainer;
|
using XLabs.Ioc.SimpleInjectorContainer;
|
||||||
using SimpleInjector;
|
using SimpleInjector;
|
||||||
|
|
||||||
@ -24,13 +23,11 @@ namespace Bit.Android
|
|||||||
#else
|
#else
|
||||||
[Application(Debuggable = false)]
|
[Application(Debuggable = false)]
|
||||||
#endif
|
#endif
|
||||||
public class MainApplication : Application, Application.IActivityLifecycleCallbacks
|
public class MainApplication : Application
|
||||||
{
|
{
|
||||||
private const string FirstLaunchKey = "firstLaunch";
|
private const string FirstLaunchKey = "firstLaunch";
|
||||||
private const string LastVersionCodeKey = "lastVersionCode";
|
private const string LastVersionCodeKey = "lastVersionCode";
|
||||||
|
|
||||||
public static Context AppContext;
|
|
||||||
|
|
||||||
public MainApplication(IntPtr handle, JniHandleOwnership transer)
|
public MainApplication(IntPtr handle, JniHandleOwnership transer)
|
||||||
: base(handle, transer)
|
: base(handle, transer)
|
||||||
{
|
{
|
||||||
@ -56,52 +53,13 @@ namespace Bit.Android
|
|||||||
// workaround for app compat bug
|
// workaround for app compat bug
|
||||||
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
|
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
|
||||||
Task.Delay(10).Wait();
|
Task.Delay(10).Wait();
|
||||||
|
CrossCurrentActivity.Current.Init(this);
|
||||||
RegisterActivityLifecycleCallbacks(this);
|
|
||||||
AppContext = ApplicationContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnTerminate()
|
|
||||||
{
|
|
||||||
base.OnTerminate();
|
|
||||||
UnregisterActivityLifecycleCallbacks(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
CrossCurrentActivity.Current.Activity = activity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityDestroyed(Activity activity)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityPaused(Activity activity)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityResumed(Activity activity)
|
|
||||||
{
|
|
||||||
CrossCurrentActivity.Current.Activity = activity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityStarted(Activity activity)
|
|
||||||
{
|
|
||||||
CrossCurrentActivity.Current.Activity = activity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityStopped(Activity activity)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetIoc(Application application)
|
public static void SetIoc(Application application)
|
||||||
{
|
{
|
||||||
Refractored.FabControl.Droid.FloatingActionButtonViewRenderer.Init();
|
Refractored.FabControl.Droid.FloatingActionButtonViewRenderer.Init();
|
||||||
CachedImageRenderer.Init(true);
|
FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
|
||||||
ZXing.Net.Mobile.Forms.Android.Platform.Init();
|
ZXing.Net.Mobile.Forms.Android.Platform.Init();
|
||||||
CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
|
CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
|
||||||
|
|
||||||
@ -109,8 +67,8 @@ namespace Bit.Android
|
|||||||
var container = new Container();
|
var container = new Container();
|
||||||
|
|
||||||
// Android Stuff
|
// Android Stuff
|
||||||
container.RegisterSingleton(application.ApplicationContext);
|
container.RegisterInstance(application.ApplicationContext);
|
||||||
container.RegisterSingleton<Application>(application);
|
container.RegisterInstance<Application>(application);
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
container.RegisterSingleton<IDatabaseService, DatabaseService>();
|
container.RegisterSingleton<IDatabaseService, DatabaseService>();
|
||||||
@ -158,9 +116,9 @@ namespace Bit.Android
|
|||||||
container.RegisterSingleton<ICipherCollectionRepository, CipherCollectionRepository>();
|
container.RegisterSingleton<ICipherCollectionRepository, CipherCollectionRepository>();
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
container.RegisterSingleton(CrossSettings.Current);
|
container.RegisterInstance(CrossSettings.Current);
|
||||||
container.RegisterSingleton(CrossConnectivity.Current);
|
container.RegisterInstance(CrossConnectivity.Current);
|
||||||
container.RegisterSingleton(CrossFingerprint.Current);
|
container.RegisterInstance(CrossFingerprint.Current);
|
||||||
|
|
||||||
// Push
|
// Push
|
||||||
#if FDROID
|
#if FDROID
|
||||||
|
@ -17,7 +17,6 @@ using Bit.App.Pages;
|
|||||||
using HockeyApp.iOS;
|
using HockeyApp.iOS;
|
||||||
using Bit.iOS.Core;
|
using Bit.iOS.Core;
|
||||||
using Google.Analytics;
|
using Google.Analytics;
|
||||||
using FFImageLoading.Forms.Touch;
|
|
||||||
using SimpleInjector;
|
using SimpleInjector;
|
||||||
using XLabs.Ioc.SimpleInjectorContainer;
|
using XLabs.Ioc.SimpleInjectorContainer;
|
||||||
using CoreNFC;
|
using CoreNFC;
|
||||||
@ -301,17 +300,17 @@ namespace Bit.iOS
|
|||||||
container.RegisterSingleton<ICipherCollectionRepository, CipherCollectionRepository>();
|
container.RegisterSingleton<ICipherCollectionRepository, CipherCollectionRepository>();
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
container.RegisterSingleton(CrossConnectivity.Current);
|
container.RegisterInstance(CrossConnectivity.Current);
|
||||||
container.RegisterSingleton(CrossFingerprint.Current);
|
container.RegisterInstance(CrossFingerprint.Current);
|
||||||
|
|
||||||
Settings = new Settings("group.com.8bit.bitwarden");
|
Settings = new Settings("group.com.8bit.bitwarden");
|
||||||
container.RegisterSingleton(Settings);
|
container.RegisterInstance(Settings);
|
||||||
|
|
||||||
// Push
|
// Push
|
||||||
container.RegisterSingleton<IPushNotificationListener, PushNotificationListener>();
|
container.RegisterSingleton<IPushNotificationListener, PushNotificationListener>();
|
||||||
container.RegisterSingleton<IPushNotificationService, iOSPushNotificationService>();
|
container.RegisterSingleton<IPushNotificationService, iOSPushNotificationService>();
|
||||||
|
|
||||||
CachedImageRenderer.Init();
|
FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
|
||||||
Resolver.SetResolver(new SimpleInjectorResolver(container));
|
Resolver.SetResolver(new SimpleInjectorResolver(container));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user