Manager m = new Manager(account, pathConfig, serviceConfiguration, userAgent);
m.migrateLegacyConfigs();
- m.updateAccountAttributes();
return m;
}
private void migrateLegacyConfigs() {
- if (account.getProfileKey() == null) {
+ if (account.getProfileKey() == null && isRegistered()) {
// Old config file, creating new profile key
account.setProfileKey(KeyUtils.createProfileKey());
account.save();
account.setUuid(accountManager.getOwnUuid());
account.save();
}
+ updateAccountAttributes();
}
}