mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
fallback to old KeyStoreStorageService
This commit is contained in:
parent
cf3998942f
commit
4a03da6b96
1 changed files with 12 additions and 2 deletions
|
@ -38,7 +38,7 @@ namespace Bit.Android
|
|||
public MainApplication(IntPtr handle, JniHandleOwnership transer)
|
||||
: base(handle, transer)
|
||||
{
|
||||
AndroidEnvironment.UnhandledExceptionRaiser += AndroidEnvironment_UnhandledExceptionRaiser;
|
||||
//AndroidEnvironment.UnhandledExceptionRaiser += AndroidEnvironment_UnhandledExceptionRaiser;
|
||||
|
||||
if(!Resolver.IsSet)
|
||||
{
|
||||
|
@ -208,10 +208,20 @@ namespace Bit.Android
|
|||
container.RegisterSingleton(application.ApplicationContext);
|
||||
container.RegisterSingleton<Application>(application);
|
||||
|
||||
ISecureStorageService secureStorage;
|
||||
try
|
||||
{
|
||||
secureStorage = new AndroidKeyStoreStorageService(CrossSettings.Current);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
secureStorage = new KeyStoreStorageService(new char[] { });
|
||||
}
|
||||
|
||||
// Services
|
||||
container.RegisterSingleton<IDatabaseService, DatabaseService>();
|
||||
container.RegisterSingleton<ISqlService, SqlService>();
|
||||
container.RegisterSingleton<ISecureStorageService, AndroidKeyStoreStorageService>();
|
||||
container.RegisterSingleton(secureStorage);
|
||||
container.RegisterSingleton<ICryptoService, CryptoService>();
|
||||
container.RegisterSingleton<IKeyDerivationService, BouncyCastleKeyDerivationService>();
|
||||
container.RegisterSingleton<IAuthService, AuthService>();
|
||||
|
|
Loading…
Reference in a new issue