kopia lustrzana https://github.com/ryukoposting/Signal-Android
Attempt to self-repair some types of profile issues.
rodzic
a28698da36
commit
2220ceb9d9
|
@ -23,6 +23,7 @@ import org.whispersystems.signalservice.api.push.exceptions.NetworkFailureExcept
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class RefreshAttributesJob extends BaseJob {
|
public class RefreshAttributesJob extends BaseJob {
|
||||||
|
|
||||||
|
@ -49,6 +50,8 @@ public class RefreshAttributesJob extends BaseJob {
|
||||||
.addConstraint(NetworkConstraint.KEY)
|
.addConstraint(NetworkConstraint.KEY)
|
||||||
.setQueue("RefreshAttributesJob")
|
.setQueue("RefreshAttributesJob")
|
||||||
.setMaxInstancesForFactory(2)
|
.setMaxInstancesForFactory(2)
|
||||||
|
.setLifespan(TimeUnit.DAYS.toDays(30))
|
||||||
|
.setMaxAttempts(Parameters.UNLIMITED)
|
||||||
.build(),
|
.build(),
|
||||||
forced);
|
forced);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,14 @@ public class RefreshOwnProfileJob extends BaseJob {
|
||||||
Util.isEmpty(profile.getAboutEmoji()))
|
Util.isEmpty(profile.getAboutEmoji()))
|
||||||
{
|
{
|
||||||
Log.w(TAG, "The profile we retrieved was empty! Ignoring it.");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package org.signal.qr
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.Size
|
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.camera.core.AspectRatio
|
import androidx.camera.core.AspectRatio
|
||||||
|
|
Ładowanie…
Reference in New Issue