+ // Store profile keys only in profile store
+ for (ContactInfo contact : account.getContactStore().getContacts()) {
+ String profileKeyString = contact.profileKey;
+ if (profileKeyString == null) {
+ continue;
+ }
+ final ProfileKey profileKey;
+ try {
+ profileKey = new ProfileKey(Base64.decode(profileKeyString));
+ } catch (InvalidInputException | IOException e) {
+ continue;
+ }
+ contact.profileKey = null;
+ account.getProfileStore().storeProfileKey(contact.getAddress(), profileKey);
+ }