Added additional logging in RetrieveProfileJob.

This commit is contained in:
Greyson Parrelli 2019-11-21 21:20:41 -05:00
parent 8772214fd4
commit 49ecd9ef5d

View File

@ -81,6 +81,8 @@ public class RetrieveProfileJob extends BaseJob {
@Override
public void onRun() throws IOException {
Log.i(TAG, "Retrieving profile of " + recipient.getId());
Recipient resolved = recipient.resolve();
if (resolved.isGroup()) handleGroupRecipient(resolved);
@ -103,6 +105,12 @@ public class RetrieveProfileJob extends BaseJob {
private void handlePhoneNumberRecipient(Recipient recipient) throws IOException {
SignalServiceProfile profile = ProfileUtil.retrieveProfile(context, recipient);
if (recipient.getProfileKey() == null) {
Log.i(TAG, "No profile key for available for " + recipient.getId());
} else {
Log.i(TAG, "Profile key available for " + recipient.getId());
}
setProfileName(recipient, profile.getName());
setProfileAvatar(recipient, profile.getAvatar());
if (FeatureFlags.USERNAMES) setUsername(recipient, profile.getUsername());
@ -196,6 +204,8 @@ public class RetrieveProfileJob extends BaseJob {
if (!Util.equals(profileAvatar, recipient.getProfileAvatar())) {
ApplicationDependencies.getJobManager().add(new RetrieveProfileAvatarJob(recipient, profileAvatar));
} else {
Log.d(TAG, "Skipping avatar fetch for " + recipient.getId());
}
}