mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 19:29:54 +01:00
Remove argon2 test job.
This commit is contained in:
@@ -10,7 +10,6 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.thoughtcrime.securesms.jobmanager.JobManager;
|
||||
import org.thoughtcrime.securesms.jobs.Argon2TestJob;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.stickers.BlessedPacks;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
@@ -51,7 +50,7 @@ public class ApplicationMigrations {
|
||||
static final int UUIDS = 6;
|
||||
static final int CACHED_ATTACHMENTS = 7;
|
||||
static final int STICKERS_LAUNCH = 8;
|
||||
static final int TEST_ARGON2 = 9;
|
||||
//static final int TEST_ARGON2 = 9;
|
||||
static final int SWOON_STICKERS = 10;
|
||||
static final int STORAGE_SERVICE = 11;
|
||||
static final int STORAGE_KEY_ROTATE = 12;
|
||||
@@ -199,9 +198,10 @@ public class ApplicationMigrations {
|
||||
jobs.put(Version.STICKERS_LAUNCH, new StickerLaunchMigrationJob());
|
||||
}
|
||||
|
||||
if (lastSeenVersion < Version.TEST_ARGON2) {
|
||||
jobs.put(Version.TEST_ARGON2, new Argon2TestMigrationJob());
|
||||
}
|
||||
// This migration only triggered a test we aren't interested in any more.
|
||||
// if (lastSeenVersion < Version.TEST_ARGON2) {
|
||||
// jobs.put(Version.TEST_ARGON2, new Argon2TestMigrationJob());
|
||||
// }
|
||||
|
||||
if (lastSeenVersion < Version.SWOON_STICKERS) {
|
||||
jobs.put(Version.SWOON_STICKERS, new StickerAdditionMigrationJob(BlessedPacks.SWOON_HANDS, BlessedPacks.SWOON_FACES));
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
package org.thoughtcrime.securesms.migrations;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.jobmanager.Data;
|
||||
import org.thoughtcrime.securesms.jobmanager.Job;
|
||||
import org.thoughtcrime.securesms.jobs.Argon2TestJob;
|
||||
|
||||
/**
|
||||
* Triggers a Argon2 Test, just once.
|
||||
*/
|
||||
public final class Argon2TestMigrationJob extends MigrationJob {
|
||||
|
||||
public static final String KEY = "Argon2TestMigrationJob";
|
||||
|
||||
private Argon2TestMigrationJob(Parameters parameters) {
|
||||
super(parameters);
|
||||
}
|
||||
|
||||
public Argon2TestMigrationJob() {
|
||||
this(new Parameters.Builder().build());
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isUiBlocking() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
void performMigration() {
|
||||
ApplicationDependencies.getJobManager().add(new Argon2TestJob());
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean shouldRetry(@NonNull Exception e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getFactoryKey() {
|
||||
return KEY;
|
||||
}
|
||||
|
||||
public static final class Factory implements Job.Factory<Argon2TestMigrationJob> {
|
||||
@Override
|
||||
public @NonNull Argon2TestMigrationJob create(@NonNull Parameters parameters, @NonNull Data data) {
|
||||
return new Argon2TestMigrationJob(parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.thoughtcrime.securesms.migrations;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.thoughtcrime.securesms.jobmanager.Data;
|
||||
import org.thoughtcrime.securesms.jobmanager.Job;
|
||||
|
||||
/**
|
||||
* A migration job that always passes. Not useful on it's own, but you can register it's factory for jobs that
|
||||
* have been removed that you'd like to pass instead of keeping around.
|
||||
*/
|
||||
public final class PassingMigrationJob extends MigrationJob {
|
||||
|
||||
public static final String KEY = "PassingMigrationJob";
|
||||
|
||||
private PassingMigrationJob(Parameters parameters) {
|
||||
super(parameters);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isUiBlocking() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
void performMigration() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean shouldRetry(@NonNull Exception e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getFactoryKey() {
|
||||
return KEY;
|
||||
}
|
||||
|
||||
public static final class Factory implements Job.Factory<PassingMigrationJob> {
|
||||
@Override
|
||||
public @NonNull PassingMigrationJob create(@NonNull Parameters parameters, @NonNull Data data) {
|
||||
return new PassingMigrationJob(parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user