kopia lustrzana https://github.com/ryukoposting/Signal-Android
Don't run ProfileUploadJob if you're not registered.
rodzic
2883d2eb31
commit
9c44a0c7d3
|
@ -11,14 +11,18 @@ import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
|||
import org.thoughtcrime.securesms.jobmanager.Data;
|
||||
import org.thoughtcrime.securesms.jobmanager.Job;
|
||||
import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.profiles.AvatarHelper;
|
||||
import org.thoughtcrime.securesms.profiles.ProfileName;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.whispersystems.signalservice.api.SignalServiceAccountManager;
|
||||
import org.whispersystems.signalservice.api.util.StreamDetails;
|
||||
|
||||
public final class ProfileUploadJob extends BaseJob {
|
||||
|
||||
private static final String TAG = Log.tag(ProfileUploadJob.class);
|
||||
|
||||
public static final String KEY = "ProfileUploadJob";
|
||||
|
||||
public static final String QUEUE = "ProfileAlteration";
|
||||
|
@ -45,6 +49,11 @@ public final class ProfileUploadJob extends BaseJob {
|
|||
|
||||
@Override
|
||||
protected void onRun() throws Exception {
|
||||
if (!TextSecurePreferences.isPushRegistered(context)) {
|
||||
Log.w(TAG, "Not registered. Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
ProfileKey profileKey = ProfileKeyUtil.getSelfProfileKey();
|
||||
ProfileName profileName = Recipient.self().getProfileName();
|
||||
String avatarPath;
|
||||
|
|
Ładowanie…
Reference in New Issue