Merge pull request #11128 from nextcloud/fix/davx5-error-message

SettingsActivity: Better error message when davX5 login fails
This commit is contained in:
Álvaro Brey 2022-12-02 17:33:33 +01:00 committed by GitHub
commit 49bd3b1efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -576,11 +576,10 @@ public class SettingsActivity extends PreferenceActivity
try {
launchDavDroidLogin();
} catch (Throwable t) {
Log_OC.e(TAG, "Base Uri for account could not be resolved to call DAVdroid!", t);
Log_OC.e(TAG, "Error while setting up DavX5", t);
DisplayUtils.showSnackMessage(
activity,
R.string.prefs_calendar_contacts_address_resolve_error
);
R.string.prefs_davx5_setup_error);
}
return true;
});
@ -863,7 +862,7 @@ public class SettingsActivity extends PreferenceActivity
if (getPackageManager().resolveActivity(davDroidLoginIntent, 0) != null) {
// arguments
if (serverBaseUri != null) {
davDroidLoginIntent.putExtra("url", serverBaseUri.toString() + DAV_PATH);
davDroidLoginIntent.putExtra("url", serverBaseUri + DAV_PATH);
davDroidLoginIntent.putExtra("loginFlow", TRUE_VALUE);
davDroidLoginIntent.setData(Uri.parse(serverBaseUri.toString() + AuthenticatorActivity.WEB_LOGIN));

View file

@ -47,6 +47,7 @@
<string name="prefs_calendar_contacts">Sync calendar &amp; contacts</string>
<string name="prefs_calendar_contacts_summary">Set up DAVx5 (formerly known as DAVdroid) (v1.3.0+) for current account</string>
<string name="prefs_calendar_contacts_address_resolve_error">Server address for the account could not be resolved for DAVx5 (formerly known as DAVdroid)</string>
<string name="prefs_davx5_setup_error">Unexpected error while setting up DAVx5 (formerly known as DAVdroid)</string>
<string name="prefs_calendar_contacts_no_store_error">Neither F-Droid nor Google Play is installed</string>
<string name="prefs_calendar_contacts_sync_setup_successful">Calendar &amp; contacts sync set up</string>
<string name="prefs_daily_backup_summary">Daily backup of your calendar &amp; contacts</string>