Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 270f37c8 authored by narinder Rana's avatar narinder Rana
Browse files

log for exceptions message

parent bae9c98f
Loading
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -1644,12 +1644,10 @@ open class MessageList :
            Log.e("MessageList", "Google account size "+googleAccounts.size)
            for (googleAccount in googleAccounts) {
                val emailId: String = accountManager.getUserData(googleAccount, ACCOUNT_EMAIL_ADDRESS_KEY)
                Log.e("MessageList", "Google emailId "+emailId)

                var accountIsSignedIn = false
                for (account in accounts) {
                    Log.e("MessageList", "account.email "+account.email)
                    if (emailId == account.email) {
                        Log.e("MessageList", "account.email true..")
                        if (account.name == null) { // we need to fix an old bug
                            account.name = emailId
                            Preferences.getPreferences(this).saveAccount(account)
@@ -1658,15 +1656,14 @@ open class MessageList :
                        break
                    }
                }
                Log.e("MessageList", "accountIsSignedIn "+accountIsSignedIn)
                if (!accountIsSignedIn) {


                    Log.e("MessageList", "accountIsSignedIn "+accountIsSignedIn)
                    //GoogleAccountCreator.createAccount(this, emailId, "asdf*1234@")
                    EeloAccountCreator.createAccount(this, emailId, "")
                    accountWasAdded = true
                }
            }
            accountWasAdded
           return accountWasAdded
        } catch (e: SecurityException) {
            e.printStackTrace()
            false
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;

import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
@@ -69,6 +70,8 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList

    private static final String EXTRA_CHECK_DIRECTION ="checkDirection";

    private String className=this.getClass().getName();

    public enum CheckDirection {
        INCOMING,
        OUTGOING;
@@ -461,6 +464,7 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList
                    finish();
                } catch (OAuth2NeedUserPromptException ignored) {
                    //let the user do oauth2 flow procedure through webview
                    Log.e(className, ignored.getMessage());
                }

            } catch (AuthenticationFailedException afe) {
+3 −0
Original line number Diff line number Diff line
@@ -5,4 +5,7 @@ object AccountManagerConstants {
    const val GOOGLE_ACCOUNT_TYPE = "e.foundation.webdav.google"
    const val ACCOUNT_EMAIL_ADDRESS_KEY = "email_address"
    const val MAIL_CONTENT_AUTHORITY = "foundation.e.mail.provider.AppContentProvider"

    const val GMAIL_AUTH_TOKEN_TYPE = "oauth2:https://mail.google.com/"

}
 No newline at end of file