diff --git a/src/Android/MainApplication.cs b/src/Android/MainApplication.cs index db042bcf7..f0f094bc8 100644 --- a/src/Android/MainApplication.cs +++ b/src/Android/MainApplication.cs @@ -143,7 +143,8 @@ namespace Bit.Droid var secureStorageService = new SecureStorageService(); var cryptoPrimitiveService = new CryptoPrimitiveService(); var mobileStorageService = new MobileStorageService(preferencesStorage, liteDbStorage); - var stateService = new StateService(mobileStorageService, secureStorageService, messagingService); + var storageMediatorService = new StorageMediatorService(mobileStorageService, secureStorageService, preferencesStorage); + var stateService = new StateService(mobileStorageService, secureStorageService, storageMediatorService, messagingService); var stateMigrationService = new StateMigrationService(liteDbStorage, preferencesStorage, secureStorageService); var clipboardService = new ClipboardService(stateService); @@ -158,6 +159,7 @@ namespace Bit.Droid var cryptoService = new CryptoService(stateService, cryptoFunctionService); var passwordRepromptService = new MobilePasswordRepromptService(platformUtilsService, cryptoService); + ServiceContainer.Register(preferencesStorage); ServiceContainer.Register("broadcasterService", broadcasterService); ServiceContainer.Register("messagingService", messagingService); ServiceContainer.Register("localizeService", localizeService); @@ -165,6 +167,7 @@ namespace Bit.Droid ServiceContainer.Register("cryptoPrimitiveService", cryptoPrimitiveService); ServiceContainer.Register("storageService", mobileStorageService); ServiceContainer.Register("secureStorageService", secureStorageService); + ServiceContainer.Register(storageMediatorService); ServiceContainer.Register("stateService", stateService); ServiceContainer.Register("stateMigrationService", stateMigrationService); ServiceContainer.Register("clipboardService", clipboardService); @@ -197,7 +200,9 @@ namespace Bit.Droid private void Bootstrap() { - (ServiceContainer.Resolve("i18nService") as MobileI18nService).Init(); + var locale = ServiceContainer.Resolve().GetLocale(); + (ServiceContainer.Resolve("i18nService") as MobileI18nService) + .Init(locale != null ? new System.Globalization.CultureInfo(locale) : null); ServiceContainer.Resolve("authService").Init(); // Note: This is not awaited var bootstrapTask = BootstrapAsync(); diff --git a/src/Android/Properties/AndroidManifest.xml b/src/Android/Properties/AndroidManifest.xml index 3437c89d7..132622e50 100644 --- a/src/Android/Properties/AndroidManifest.xml +++ b/src/Android/Properties/AndroidManifest.xml @@ -45,11 +45,11 @@ - + - + \ No newline at end of file diff --git a/src/App/Pages/Settings/OptionsPage.xaml b/src/App/Pages/Settings/OptionsPage.xaml index 2f3abbf67..fb8a4966f 100644 --- a/src/App/Pages/Settings/OptionsPage.xaml +++ b/src/App/Pages/Settings/OptionsPage.xaml @@ -80,6 +80,22 @@ Text="{u:I18n ClearClipboardDescription}" StyleClass="box-footer-label" /> + + + +