Exemple #1
0
 //Is only invoked if data was garbage collected.
 void OnFail()
 {
     ShowSpinner(false);
     AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, null,
                                       $"{nameof(QuestionnaireCountriesSelectionActivity)}.{nameof(OnFail)}: " +
                                       $"AuthenticationState.personaldata was garbage collected (Android)");
 }
 void OnFail()
 {
     NextBtn.HideSpinner();
     AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, null,
                                       $"{nameof(QuestionnaireViewController)}.{nameof(OnFail)}: " +
                                       $"AuthenticationState.personaldata is not valid");
 }
Exemple #3
0
 //Is only invoked if data was garbage collected.
 void OnFail()
 {
     NextBtn.HideSpinner();
     AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, null,
                                       $"{nameof(QuestionnaireCountriesViewController)}.{nameof(OnFail)}: " +
                                       $"AuthenticationState.personaldata was garbage collected (IOS)");
 }
 void OnError(Exception e)
 {
     if (e is AccessDeniedException)
     {
         LogUtils.LogMessage(LogSeverity.INFO, "The user refused to share keys", null);
         RunOnUiThread(() => { GoToInfectionStatusPage(); });
     }
     else
     {
         RunOnUiThread(() => AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, e, "Pushing keys failed"));
     }
 }
 void OnError(Exception e)
 {
     if (LocalPreferencesHelper.HasNeverSuccessfullyFetchedFHIData)
     {
         AuthErrorUtils.GoToTechnicalErrorFHINumbers(this, LogSeverity.ERROR, e, "Could not load data for disease rate of the day, showing technical error page");
     }
     else
     {
         LogUtils.LogException(LogSeverity.ERROR, e, "Could not load data for disease rate of the day, showing old data");
         NavigationController?.PushViewController(DailyNumbersViewController.Create(), true);
     }
 }
 void OnError(Exception e)
 {
     if (LocalPreferencesHelper.HasNeverSuccessfullyFetchedFHIData)
     {
         RunOnUiThread(() => AuthErrorUtils.GoToTechnicalErrorFHINumbers(this, LogSeverity.ERROR, e, "Could not load data for disease rate of the day, showing technical error page"));
     }
     else
     {
         LogUtils.LogException(LogSeverity.ERROR, e, "Could not load data for disease rate of the day, showing old data");
         RunOnUiThread(() => StartActivity(new Intent(this, typeof(DailyNumbersActivity))));
     }
 }
        //After calling this method you cannot return by going "Back".
        //OnCreate has to be called again if returning to this page.
        void GoToErrorPage(AuthErrorType error)
        {
            _viewModel.Cleanup();
            RunOnUiThread(() =>
            {
                switch (error)
                {
                    case AuthErrorType.MaxTriesExceeded:
                        AuthErrorUtils.GoToManyTriesError(this, LogSeverity.WARNING, null, "Max number of tries was exceeded");
                        break;
                    case AuthErrorType.NotInfected:
                        AuthErrorUtils.GoToNotInfectedError(this, LogSeverity.WARNING, null, "User is not infected");
                        break;
                    case AuthErrorType.Unknown:
                        AuthErrorUtils.GoToTechnicalError(this, Enums.LogSeverity.WARNING, null, "User sees Technical error page after ID Porten login: Unknown auth error or user press backbtn");
                        break;
                }

            });
        }
Exemple #8
0
 void OnError(Exception e, bool isOnFail = false)
 {
     if (e is AccessDeniedException)
     {
         LogUtils.LogMessage(LogSeverity.INFO, "The user refused to share keys", null, GetCorrelationId());
         RunOnUiThread(() => { GoToInfectionStatusPage(); });
     }
     else
     {
         if (!isOnFail)
         {
             LogUtils.LogMessage(
                 LogSeverity.INFO,
                 "Something went wrong during key sharing",
                 e.Message,
                 GetCorrelationId());
         }
         RunOnUiThread(() => AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, e, "Pushing keys failed"));
     }
 }
 void OnFail()
 {
     AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, null,
                                       $"{nameof(CountriesConsentViewController)}.{nameof(OnFail)}: " +
                                       "AuthenticationState.PersonalData was garbage collected (iOS)");
 }
 private void OnFail()
 {
     AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, null,
                                       $"{nameof(CountriesConsentActivity)}.{nameof(OnFail)}: " +
                                       "AuthenticationState.PersonalData was garbage collected (Android)");
 }
Exemple #11
0
 void OnValidationFail()
 {
     AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, null,
                                       $"{nameof(QuestionnaireCountriesSelectionActivity)}.{nameof(OnFail)}: " +
                                       "AuthenticationState.personaldata is not valid (Android)");
 }
Exemple #12
0
 void OnError(Exception e)
 {
     AuthErrorUtils.GoToTechnicalError(this, LogSeverity.ERROR, e, "Pushing keys failed");
 }