Commit 3fab975a authored by Ricki Hirner's avatar Ricki Hirner 🐑

Open DAVdroid main activity when add a "DAVdroid Address book" account is added over Settings

parent e767dcbf
Pipeline #7351490 failed with stage
in 5 minutes and 31 seconds
......@@ -11,6 +11,7 @@ package at.bitfire.davdroid.syncadapter;
import android.accounts.AbstractAccountAuthenticator;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.AccountManager;
import android.accounts.NetworkErrorException;
import android.content.Context;
......@@ -18,6 +19,8 @@ import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import at.bitfire.davdroid.ui.AccountsActivity;
public class NullAuthenticatorService extends Service {
private AccountAuthenticator accountAuthenticator;
......@@ -50,7 +53,11 @@ public class NullAuthenticatorService extends Service {
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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment