public AuthenticatorListAdapter(AuthenticatorSource authSource, CustomIconSource customIconSource, ViewMode viewMode, bool isDark)
 {
     _authSource       = authSource;
     _customIconSource = customIconSource;
     _viewMode         = viewMode;
     _isDark           = isDark;
 }
 public WearQueryService()
 {
     _initTask = new Lazy <Task>(async() =>
     {
         _connection       = await Database.Connect(ApplicationContext);
         _authSource       = new AuthenticatorSource(_connection);
         _customIconSource = new CustomIconSource(_connection);
     });
 }
Beispiel #3
0
 public WearQueryService()
 {
     _initTask = new Lazy <Task>(async delegate
     {
         var password      = await SecureStorageWrapper.GetDatabasePassword();
         _connection       = await Database.GetPrivateConnection(password);
         _customIconSource = new CustomIconSource(_connection);
         _categorySource   = new CategorySource(_connection);
         _authSource       = new AuthenticatorSource(_connection);
     });
 }
        public AuthenticatorListAdapter(Context context, AuthenticatorSource authSource, CustomIconSource customIconSource, ViewMode viewMode, bool isDark)
        {
            _authSource       = authSource;
            _customIconSource = customIconSource;
            _viewMode         = viewMode;
            _isDark           = isDark;

            _secondsRemainingPerPeriod = new Dictionary <int, int>();
            _progressPerPeriod         = new Dictionary <int, int>();
            _counterCooldownSeconds    = new Dictionary <int, int>();

            _animationScale = Settings.Global.GetFloat(context.ContentResolver, Settings.Global.AnimatorDurationScale, 1.0f);
        }
Beispiel #5
0
        public AuthenticatorListAdapter(Context context, AuthenticatorSource authSource, CustomIconSource customIconSource, ViewMode viewMode, bool isDark)
        {
            _authSource       = authSource;
            _customIconSource = customIconSource;
            _viewMode         = viewMode;
            _isDark           = isDark;

            _customIconDecodeLock = new SemaphoreSlim(1, 1);
            _decodedCustomIcons   = new Dictionary <string, Bitmap>();

            _generationOffsets      = new Dictionary <int, long>();
            _counterCooldownOffsets = new Dictionary <int, long>();

            _animationScale = Settings.Global.GetFloat(context.ContentResolver, Settings.Global.AnimatorDurationScale, 1.0f);
        }
Beispiel #6
0
        public AutoBackupWorker(Context context, WorkerParameters workerParams) : base(context, workerParams)
        {
            _context     = context;
            _preferences = new PreferenceWrapper(context);

            _initTask = new Lazy <Task>(async delegate
            {
                var password      = await SecureStorageWrapper.GetDatabasePassword();
                _connection       = await Database.GetPrivateConnection(password);
                _customIconSource = new CustomIconSource(_connection);
                _categorySource   = new CategorySource(_connection);
                _authSource       = new AuthenticatorSource(_connection);

                await _categorySource.Update();
                await _customIconSource.Update();
                await _authSource.Update();
            });
        }
Beispiel #7
0
        private async Task Init()
        {
            _categorySource = new CategorySource(_connection);
            await _categorySource.Update();

            _customIconSource = new CustomIconSource(_connection);
            await _customIconSource.Update();

            _authSource = new AuthenticatorSource(_connection);
            RunOnUiThread(InitAuthenticatorList);
            await RefreshAuthenticators();

            _timer = new Timer {
                Interval  = 1000,
                AutoReset = true
            };

            _timer.Elapsed += Tick;
        }