mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-28 21:57:17 +00:00
Improve handling of empty profiles.
This commit is contained in:
committed by
Alex Hart
parent
e2703b459f
commit
32c4fcb065
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user