var onCredentialsChangedAssistant = function (future) {};

onCredentialsChangedAssistant.prototype.run = function (outerFuture) {
  log("============== onCredentialsChangedAssistant");
  log("Params: " + JSON.stringify(this.controller.args)); //may contain password.
  log("Future: " + JSON.stringify(outerFuture.result));
  
  if (locked === true) {
    log("Locked... already running?");
    previousOperationFuture.then(this, function (f) {
      log("PreviousOperation finished " + JSON.stringify(f.result) + " , starting onCredentialsChangedAssistant");
      this.run(outerFuture);
    });
    return;
  }
  
  //this assistant is not helpfull.. it only get's the accountId, but no new credentials??? Why??? :(
  finishAssistant(outerFuture, { returnValue: false, success: false });
};

var onCredentialsChangedAssistant = function (future) {};

onCredentialsChangedAssistant.prototype.run = function (outerFuture) {
  log("============== onCredentialsChangedAssistant");
  log("Params: " + JSON.stringify(this.controller.args)); //may contain password.
  log("Future: " + JSON.stringify(outerFuture.result));
  
//  if (locked === true) {
//    log("Locked... already running?");
//    previousOperationFuture.then(this, function (f) {
//      log("PreviousOperation finished " + JSON.stringify(f.result) + " , starting onCredentialsChangedAssistant");
//      this.run(outerFuture);
//    });
//    return;
//  }
  
  //this assistant is not helpfull.. it only get's the accountId, but no new credentials??? Why??? :(
  finishAssistant(outerFuture, { returnValue: false, success: false });
};

Change was necessary to allow modifyAccount calls in storeAccounts to return. We don't really use the webOS stored credentials anyway... no idea how to read them.
Change was necessary to allow modifyAccount calls in storeAccounts to
return. We don't really use the webOS stored credentials anyway... no
idea how to read them.