Attempt to self-repair some types of profile issues.

fork-5.53.8
Greyson Parrelli 2022-08-15 10:36:33 -04:00
rodzic a28698da36
commit 2220ceb9d9
3 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -23,6 +23,7 @@ import org.whispersystems.signalservice.api.push.exceptions.NetworkFailureExcept
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.TimeUnit;
public class RefreshAttributesJob extends BaseJob {
@ -49,6 +50,8 @@ public class RefreshAttributesJob extends BaseJob {
.addConstraint(NetworkConstraint.KEY)
.setQueue("RefreshAttributesJob")
.setMaxInstancesForFactory(2)
.setLifespan(TimeUnit.DAYS.toDays(30))
.setMaxAttempts(Parameters.UNLIMITED)
.build(),
forced);
}

Wyświetl plik

@ -120,6 +120,14 @@ public class RefreshOwnProfileJob extends BaseJob {
Util.isEmpty(profile.getAboutEmoji()))
{
Log.w(TAG, "The profile we retrieved was empty! Ignoring it.");
if (!self.getProfileName().isEmpty()) {
Log.w(TAG, "We have a name locally. Scheduling a profile upload.");
ApplicationDependencies.getJobManager().add(new ProfileUploadJob());
} else {
Log.w(TAG, "We don't have a name locally, either!");
}
return;
}

Wyświetl plik

@ -2,7 +2,6 @@ package org.signal.qr
import android.annotation.SuppressLint
import android.content.Context
import android.util.Size
import android.widget.FrameLayout
import androidx.annotation.RequiresApi
import androidx.camera.core.AspectRatio