public void setAccountDisplayName(int n, String displayName) {
   try {
     LinphoneProxyConfig prxCfg = getProxyConfig(n);
     LinphoneAddress addr =
         LinphoneCoreFactory.instance().createLinphoneAddress(prxCfg.getIdentity());
     addr.setDisplayName(displayName);
     prxCfg.edit();
     prxCfg.setIdentity(addr.asString());
     prxCfg.done();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
  public void setAccountDomain(int n, String domain) {
    String identity = "sip:" + getAccountUsername(n) + "@" + domain;

    try {
      LinphoneAuthInfo authInfo = getClonedAuthInfo(n);
      authInfo.setDomain(domain);
      saveAuthInfo(authInfo);

      LinphoneProxyConfig prxCfg = getProxyConfig(n);
      prxCfg.edit();
      prxCfg.setIdentity(identity);
      prxCfg.done();
    } catch (LinphoneCoreException e) {
      e.printStackTrace();
    }
  }
  public void setAccountUsername(int n, String username) {
    String identity = "sip:" + username + "@" + getAccountDomain(n);
    LinphoneAuthInfo info =
        getClonedAuthInfo(
            n); // Get the auth info before editing the proxy config to ensure to get the correct
                // auth info
    try {
      LinphoneProxyConfig prxCfg = getProxyConfig(n);
      prxCfg.edit();
      prxCfg.setIdentity(identity);
      prxCfg.done();

      info.setUsername(username);
      saveAuthInfo(info);
    } catch (LinphoneCoreException e) {
      e.printStackTrace();
    }
  }