コード例 #1
0
        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);
        }
コード例 #2
0
 public RestoreServiceTest(IAuthenticatorRepository authenticatorRepository,
                           IAuthenticatorCategoryRepository authenticatorCategoryRepository, ICategoryRepository categoryRepository,
                           ICustomIconRepository customIconRepository, IRestoreService restoreService, Backup backup)
     : base(authenticatorRepository, categoryRepository, authenticatorCategoryRepository, customIconRepository)
 {
     _restoreService = restoreService;
     _backup         = backup;
 }
コード例 #3
0
 public DataTest(IAuthenticatorRepository authenticatorRepository,
                 ICategoryRepository categoryRepository,
                 IAuthenticatorCategoryRepository authenticatorCategoryRepository,
                 ICustomIconRepository customIconRepository)
 {
     AuthenticatorRepository         = authenticatorRepository;
     AuthenticatorCategoryRepository = authenticatorCategoryRepository;
     CategoryRepository   = categoryRepository;
     CustomIconRepository = customIconRepository;
 }
コード例 #4
0
 public BackupService(IAuthenticatorRepository authenticatorRepository, ICategoryRepository categoryRepository,
                      IAuthenticatorCategoryRepository authenticatorCategoryRepository,
                      ICustomIconRepository customIconRepository, IAssetProvider assetProvider)
 {
     _authenticatorRepository         = authenticatorRepository;
     _categoryRepository              = categoryRepository;
     _authenticatorCategoryRepository = authenticatorCategoryRepository;
     _customIconRepository            = customIconRepository;
     _assetProvider = assetProvider;
 }
コード例 #5
0
 public AuthenticatorService(IAuthenticatorRepository authenticatorRepository,
                             IAuthenticatorCategoryRepository authenticatorCategoryRepository,
                             IIconResolver iconResolver, ICustomIconService customIconService,
                             ICustomIconRepository customIconRepository)
 {
     _authenticatorRepository         = authenticatorRepository;
     _authenticatorCategoryRepository = authenticatorCategoryRepository;
     _iconResolver         = iconResolver;
     _customIconService    = customIconService;
     _customIconRepository = customIconRepository;
 }
コード例 #6
0
        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;
                }
            });
        }
コード例 #7
0
        public AutoBackupWorker(Context context, WorkerParameters workerParams) : base(context, workerParams)
        {
            _context             = context;
            _preferences         = new PreferenceWrapper(context);
            _shouldCloseDatabase = false;

            _database                        = Dependencies.Resolve <Database>();
            _restoreService                  = Dependencies.Resolve <IRestoreService>();
            _authenticatorRepository         = Dependencies.Resolve <IAuthenticatorRepository>();
            _categoryRepository              = Dependencies.Resolve <ICategoryRepository>();
            _authenticatorCategoryRepository = Dependencies.Resolve <IAuthenticatorCategoryRepository>();
            _customIconRepository            = Dependencies.Resolve <ICustomIconRepository>();

            _initTask = new Lazy <Task>(async delegate
            {
                if (!_database.IsOpen)
                {
                    var password = await SecureStorageWrapper.GetDatabasePassword();
                    await _database.Open(password);
                    _shouldCloseDatabase = true;
                }
            });
        }
コード例 #8
0
 public CustomIconService(ICustomIconRepository customIconRepository,
                          IAuthenticatorRepository authenticatorRepository)
 {
     _customIconRepository    = customIconRepository;
     _authenticatorRepository = authenticatorRepository;
 }