app/src/main/java/org/andstatus/app/account/StateOfAccountChangeProcess.java
/**
     * Store the state of the not completed actions in the global static object
     * or forget old state of completed action
     */
Store the state of the not completed actions in the global static object
or forget old state of completed action
Store the state of the not completed actions in the global static object or forget old state of completed action
void save() {
        if (actionCompleted) {
            forget();
        } else {
            STORED_STATE.updateAndGet(b -> {
                Bundle bundle = new Bundle();
                bundle.putString(ACCOUNT_ACTION_KEY, getAccountAction());
                bundle.putBoolean(ACTION_COMPLETED_KEY, actionCompleted);
                bundle.putBoolean(ACTION_SUCCEEDED_KEY, actionSucceeded);
                bundle.putParcelable(ACCOUNT_KEY, builder);
                bundle.putParcelable(ACCOUNT_AUTHENTICATOR_RESPONSE_KEY, authenticatorResponse);
                bundle.putString(REQUEST_TOKEN_KEY, requestToken);
                bundle.putString(REQUEST_SECRET_KEY, requestSecret);
                return bundle;
            });
            MyLog.v(this, "State saved");
        }
    }
void save ( ) { if ( actionCompleted ) { forget ( ) ; } else { STORED_STATE . updateAndGet ( b -> { Bundle bundle = new Bundle ( ) ; bundle . putString ( ACCOUNT_ACTION_KEY , getAccountAction ( ) ) ; bundle . putBoolean ( ACTION_COMPLETED_KEY , actionCompleted ) ; bundle . putBoolean ( ACTION_SUCCEEDED_KEY , actionSucceeded ) ; bundle . putParcelable ( ACCOUNT_KEY , builder ) ; bundle . putParcelable ( ACCOUNT_AUTHENTICATOR_RESPONSE_KEY , authenticatorResponse ) ; bundle . putString ( REQUEST_TOKEN_KEY , requestToken ) ; bundle . putString ( REQUEST_SECRET_KEY , requestSecret ) ; return bundle ; } ) ; MyLog . v ( this , "State saved" ) ; } }
Store the state of the not completed actions in the global static object
 or forget old state of completed action
Store the state of the not completed actions in the global static object or forget old state of completed action