Prevent conscrypt crash during profile retrieval.
This was a mitigation that was previously in place that was forgotten during the recent avatar refactor.
This commit is contained in:
parent
ab600d7df1
commit
f859c5b1b5
1 changed files with 5 additions and 1 deletions
|
@ -100,7 +100,11 @@ public class RetrieveProfileAvatarJob extends BaseJob {
|
|||
SignalServiceMessageReceiver receiver = ApplicationDependencies.getSignalServiceMessageReceiver();
|
||||
InputStream avatarStream = receiver.retrieveProfileAvatar(profileAvatar, downloadDestination, profileKey, AvatarHelper.AVATAR_DOWNLOAD_FAILSAFE_MAX_SIZE);
|
||||
|
||||
AvatarHelper.setAvatar(context, recipient.getId(), avatarStream);
|
||||
try {
|
||||
AvatarHelper.setAvatar(context, recipient.getId(), avatarStream);
|
||||
} catch (AssertionError e) {
|
||||
throw new IOException("Failed to copy stream. Likely a Conscrypt issue.", e);
|
||||
}
|
||||
} catch (PushNetworkException e) {
|
||||
if (e.getCause() instanceof NonSuccessfulResponseCodeException) {
|
||||
Log.w(TAG, "Removing profile avatar (no image available) for: " + recipient.getId().serialize());
|
||||
|
|
Loading…
Add table
Reference in a new issue