mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Added Gmail state
This commit is contained in:
@@ -58,6 +58,7 @@ import java.util.Map;
|
||||
|
||||
import static android.accounts.AccountManager.newChooseAccountIntent;
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
import static eu.faircode.email.GmailState.TYPE_GOOGLE;
|
||||
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_GMAIL;
|
||||
|
||||
public class FragmentGmail extends FragmentBase {
|
||||
@@ -75,8 +76,6 @@ public class FragmentGmail extends FragmentBase {
|
||||
|
||||
private Group grpError;
|
||||
|
||||
private static String TYPE_GOOGLE = "com.google";
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
@@ -318,11 +317,13 @@ public class FragmentGmail extends FragmentBase {
|
||||
}
|
||||
}
|
||||
|
||||
private void onAuthorized(String user, String password) {
|
||||
private void onAuthorized(String user, String token) {
|
||||
GmailState state = GmailState.jsonDeserialize(token);
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putString("name", etName.getText().toString().trim());
|
||||
args.putString("user", user);
|
||||
args.putString("password", password);
|
||||
args.putString("password", state.jsonSerializeString());
|
||||
|
||||
new SimpleTask<Void>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user