use of org.thoughtcrime.securesms.jobs.MultiDeviceStickerPackOperationJob in project Signal-Android by WhisperSystems.
the class StickerManagementRepository method installStickerPack.
void installStickerPack(@NonNull String packId, @NonNull String packKey, boolean notify) {
SignalExecutors.SERIAL.execute(() -> {
JobManager jobManager = ApplicationDependencies.getJobManager();
if (stickerDatabase.isPackAvailableAsReference(packId)) {
stickerDatabase.markPackAsInstalled(packId, notify);
}
jobManager.add(StickerPackDownloadJob.forInstall(packId, packKey, notify));
if (TextSecurePreferences.isMultiDevice(context)) {
jobManager.add(new MultiDeviceStickerPackOperationJob(packId, packKey, MultiDeviceStickerPackOperationJob.Type.INSTALL));
}
});
}
use of org.thoughtcrime.securesms.jobs.MultiDeviceStickerPackOperationJob in project Signal-Android by WhisperSystems.
the class StickerLaunchMigrationJob method installPack.
private static void installPack(@NonNull Context context, @NonNull BlessedPacks.Pack pack) {
JobManager jobManager = ApplicationDependencies.getJobManager();
StickerDatabase stickerDatabase = SignalDatabase.stickers();
if (stickerDatabase.isPackAvailableAsReference(pack.getPackId())) {
stickerDatabase.markPackAsInstalled(pack.getPackId(), false);
}
jobManager.add(StickerPackDownloadJob.forInstall(pack.getPackId(), pack.getPackKey(), false));
if (TextSecurePreferences.isMultiDevice(context)) {
jobManager.add(new MultiDeviceStickerPackOperationJob(pack.getPackId(), pack.getPackKey(), MultiDeviceStickerPackOperationJob.Type.INSTALL));
}
}
use of org.thoughtcrime.securesms.jobs.MultiDeviceStickerPackOperationJob in project Signal-Android by signalapp.
the class StickerManagementRepository method installStickerPack.
void installStickerPack(@NonNull String packId, @NonNull String packKey, boolean notify) {
SignalExecutors.SERIAL.execute(() -> {
JobManager jobManager = ApplicationDependencies.getJobManager();
if (stickerDatabase.isPackAvailableAsReference(packId)) {
stickerDatabase.markPackAsInstalled(packId, notify);
}
jobManager.add(StickerPackDownloadJob.forInstall(packId, packKey, notify));
if (TextSecurePreferences.isMultiDevice(context)) {
jobManager.add(new MultiDeviceStickerPackOperationJob(packId, packKey, MultiDeviceStickerPackOperationJob.Type.INSTALL));
}
});
}
use of org.thoughtcrime.securesms.jobs.MultiDeviceStickerPackOperationJob in project Signal-Android by signalapp.
the class StickerLaunchMigrationJob method installPack.
private static void installPack(@NonNull Context context, @NonNull BlessedPacks.Pack pack) {
JobManager jobManager = ApplicationDependencies.getJobManager();
StickerDatabase stickerDatabase = SignalDatabase.stickers();
if (stickerDatabase.isPackAvailableAsReference(pack.getPackId())) {
stickerDatabase.markPackAsInstalled(pack.getPackId(), false);
}
jobManager.add(StickerPackDownloadJob.forInstall(pack.getPackId(), pack.getPackKey(), false));
if (TextSecurePreferences.isMultiDevice(context)) {
jobManager.add(new MultiDeviceStickerPackOperationJob(pack.getPackId(), pack.getPackKey(), MultiDeviceStickerPackOperationJob.Type.INSTALL));
}
}
Aggregations