mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Merge pull request #10703 from nextcloud/addAccount
Restart account creation with AuthenticatorActivity, which helps to add account in restricted profiles, e.g. MDM or Samsung second users
This commit is contained in:
commit
c962476d90
1 changed files with 7 additions and 7 deletions
|
@ -27,6 +27,7 @@ import android.accounts.AuthenticatorException;
|
|||
import android.accounts.OperationCanceledException;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
|
@ -35,6 +36,7 @@ import com.nextcloud.common.NextcloudClient;
|
|||
import com.nextcloud.java.util.Optional;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AuthenticatorActivity;
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.lib.common.OwnCloudAccount;
|
||||
|
@ -400,12 +402,10 @@ public class UserAccountManagerImpl implements UserAccountManager {
|
|||
|
||||
@Override
|
||||
public void startAccountCreation(final Activity activity) {
|
||||
accountManager.addAccount(getAccountType(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
activity,
|
||||
null,
|
||||
null);
|
||||
Intent intent = new Intent(context, AuthenticatorActivity.class);
|
||||
|
||||
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue