Improve handling of empty profiles.
This commit is contained in:
parent
e2703b459f
commit
32c4fcb065
1 changed files with 5 additions and 4 deletions
|
@ -451,6 +451,11 @@ public class RetrieveProfileJob extends BaseJob {
|
|||
|
||||
String plaintextProfileName = Util.emptyIfNull(ProfileUtil.decryptString(profileKey, profileName));
|
||||
|
||||
if (TextUtils.isEmpty(plaintextProfileName)) {
|
||||
Log.w(TAG, "No name set on the profile for " + recipient.getId() + " -- Leaving it alone");
|
||||
return;
|
||||
}
|
||||
|
||||
ProfileName remoteProfileName = ProfileName.fromSerialized(plaintextProfileName);
|
||||
ProfileName localProfileName = recipient.getProfileName();
|
||||
|
||||
|
@ -474,10 +479,6 @@ public class RetrieveProfileJob extends BaseJob {
|
|||
recipient.isBlocked(), recipient.isGroup(), recipient.isSelf(), localDisplayName.isEmpty(), !remoteDisplayName.equals(localDisplayName)));
|
||||
}
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(plaintextProfileName)) {
|
||||
Log.i(TAG, "No profile name set for " + recipient.getId());
|
||||
}
|
||||
} catch (InvalidCiphertextException e) {
|
||||
Log.w(TAG, "Bad profile key for " + recipient.getId());
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue