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

Commit 910a7045 authored by vincent's avatar vincent
Browse files

port commit d1d1fc2d to eelo-0.2

parent daab7d8f
Loading
Loading
Loading
Loading
+7 −27
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ public class EAccountManagerActivity extends SubBaseActivity {

    public static final String TAG = EAccountManagerActivity.class.getSimpleName();
    
    private static boolean isInit = false;
    private AccountManager accountManager = null;

    @Override
@@ -64,12 +63,15 @@ public class EAccountManagerActivity extends SubBaseActivity {
    }

    private void launchAccountManagerSetup() {
    
        isInit = true;
        
        try {
            accountManager = AccountManager.get(this);
            accountManager.addAccount("bitfire.at.davdroid.eelo", null, null, null, this, null, null);
            accountManager.addAccount("bitfire.at.davdroid.eelo", null, null, null, this, new AccountManagerCallback<Bundle>() {
                @Override
                public void run(AccountManagerFuture<Bundle> future) {
                    // An eelo account has been added, continue to the next screen
                    onNavigateNext();
                }
            }, null);
        } 
        catch (Exception e) {} 
        finally {}
@@ -79,26 +81,4 @@ public class EAccountManagerActivity extends SubBaseActivity {
    protected int getSubactivityNextTransition() {
        return TRANSITION_ID_SLIDE;
    }
    
    @Override
    protected void onResume() {
        super.onResume();

        if (isInit == false)
            return;
        
        try {
            Account[] accounts = accountManager.getAccounts();
            if (accounts != null) {
                // An eelo account has been created, goto the next screen
                onNavigateNext();
            }
        } 
        catch (Exception e) {
            onNavigateNext();
        } 
        finally {}

    }

}
 No newline at end of file