public AuthenticatorListAdapter(Context context, IAuthenticatorService authenticatorService, IAuthenticatorView authenticatorView, ICustomIconRepository customIconRepository, bool isDark) { _authenticatorService = authenticatorService; _authenticatorView = authenticatorView; _customIconRepository = customIconRepository; var preferences = new PreferenceWrapper(context); _viewMode = ViewModeSpecification.FromName(preferences.ViewMode); _tapToReveal = preferences.TapToReveal; _codeGroupSize = preferences.CodeGroupSize; _isDark = isDark; _customIconDecodeLock = new SemaphoreSlim(1, 1); _decodedCustomIcons = new Dictionary <string, Bitmap>(); _generationOffsets = new Dictionary <int, long>(); _counterCooldownOffsets = new Dictionary <int, long>(); _positionsToUpdate = new Queue <int>(); _offsetsToUpdate = new Queue <int>(); _animationScale = Settings.Global.GetFloat(context.ContentResolver, Settings.Global.AnimatorDurationScale, 1.0f); }
public WearQueryService() { _shouldCloseDatabase = false; _database = Dependencies.Resolve <Database>(); _authenticatorView = Dependencies.Resolve <IAuthenticatorView>(); _authenticatorCategoryRepository = Dependencies.Resolve <IAuthenticatorCategoryRepository>(); _categoryRepository = Dependencies.Resolve <ICategoryRepository>(); _customIconRepository = Dependencies.Resolve <ICustomIconRepository>(); _initTask = new Lazy <Task>(async delegate { if (!_database.IsOpen) { var password = await SecureStorageWrapper.GetDatabasePassword(); await _database.Open(password); _shouldCloseDatabase = true; } }); }