From 138d344a5b1357f5cbd65da2e0f7723d8d4b533a Mon Sep 17 00:00:00 2001 From: Ricki Hirner Date: Thu, 30 Mar 2017 21:22:46 +0200 Subject: [PATCH] Open DAVdroid main activity when add a "DAVdroid Address book" account is added over Settings --- .../syncadapter/syncadapter/NullAuthenticatorService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/NullAuthenticatorService.java b/app/src/main/java/com/etesync/syncadapter/syncadapter/NullAuthenticatorService.java index ee1fc9b3..4bbda624 100644 --- a/app/src/main/java/com/etesync/syncadapter/syncadapter/NullAuthenticatorService.java +++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/NullAuthenticatorService.java @@ -19,6 +19,8 @@ import android.content.Intent; import android.os.Bundle; import android.os.IBinder; +import com.etesync.syncadapter.ui.AccountsActivity; + public class NullAuthenticatorService extends Service { private AccountAuthenticator accountAuthenticator; @@ -51,7 +53,11 @@ public class NullAuthenticatorService extends Service { @Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { - return null; + Intent intent = new Intent(context, AccountsActivity.class); + intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response); + Bundle bundle = new Bundle(); + bundle.putParcelable(AccountManager.KEY_INTENT, intent); + return bundle; } @Override