use of org.thoughtcrime.securesms.jobs.StorageForcePushJob in project Signal-Android by WhisperSystems.
the class StorageCapabilityMigrationJob method performMigration.
@Override
public void performMigration() {
JobManager jobManager = ApplicationDependencies.getJobManager();
jobManager.add(new RefreshAttributesJob());
if (TextSecurePreferences.isMultiDevice(context)) {
Log.i(TAG, "Multi-device.");
jobManager.startChain(new StorageForcePushJob()).then(new MultiDeviceKeysUpdateJob()).then(new MultiDeviceStorageSyncRequestJob()).enqueue();
} else {
Log.i(TAG, "Single-device.");
jobManager.add(new StorageForcePushJob());
}
}
use of org.thoughtcrime.securesms.jobs.StorageForcePushJob in project Signal-Android by signalapp.
the class StorageCapabilityMigrationJob method performMigration.
@Override
public void performMigration() {
JobManager jobManager = ApplicationDependencies.getJobManager();
jobManager.add(new RefreshAttributesJob());
if (TextSecurePreferences.isMultiDevice(context)) {
Log.i(TAG, "Multi-device.");
jobManager.startChain(new StorageForcePushJob()).then(new MultiDeviceKeysUpdateJob()).then(new MultiDeviceStorageSyncRequestJob()).enqueue();
} else {
Log.i(TAG, "Single-device.");
jobManager.add(new StorageForcePushJob());
}
}
use of org.thoughtcrime.securesms.jobs.StorageForcePushJob in project Signal-Android by signalapp.
the class PinOptOutMigration method performMigration.
@Override
void performMigration() {
if (SignalStore.kbsValues().hasOptedOut() && SignalStore.kbsValues().hasPin()) {
Log.w(TAG, "Discovered a legacy opt-out user! Resetting the state.");
SignalStore.kbsValues().optOut();
ApplicationDependencies.getJobManager().add(new RefreshAttributesJob());
ApplicationDependencies.getJobManager().add(new StorageForcePushJob());
} else if (SignalStore.kbsValues().hasOptedOut()) {
Log.i(TAG, "Discovered an opt-out user, but they're already in a good state. No action required.");
} else {
Log.i(TAG, "Discovered a normal PIN user. No action required.");
}
}
use of org.thoughtcrime.securesms.jobs.StorageForcePushJob in project Signal-Android by WhisperSystems.
the class PinOptOutMigration method performMigration.
@Override
void performMigration() {
if (SignalStore.kbsValues().hasOptedOut() && SignalStore.kbsValues().hasPin()) {
Log.w(TAG, "Discovered a legacy opt-out user! Resetting the state.");
SignalStore.kbsValues().optOut();
ApplicationDependencies.getJobManager().add(new RefreshAttributesJob());
ApplicationDependencies.getJobManager().add(new StorageForcePushJob());
} else if (SignalStore.kbsValues().hasOptedOut()) {
Log.i(TAG, "Discovered an opt-out user, but they're already in a good state. No action required.");
} else {
Log.i(TAG, "Discovered a normal PIN user. No action required.");
}
}
Aggregations