Attempt to self-repair some types of profile issues.
This commit is contained in:
parent
a28698da36
commit
2220ceb9d9
3 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue