本文整理汇总了Java中org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement类的典型用法代码示例。如果您正苦于以下问题:Java MasterSecretRequirement类的具体用法?Java MasterSecretRequirement怎么用?Java MasterSecretRequirement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MasterSecretRequirement类属于org.thoughtcrime.securesms.jobs.requirements包,在下文中一共展示了MasterSecretRequirement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: constructParameters
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
protected static JobParameters constructParameters(Context context, String destination) {
JobParameters.Builder builder = JobParameters.newBuilder();
builder.withPersistence();
builder.withGroupId(destination);
builder.withRequirement(new MasterSecretRequirement(context));
builder.withRequirement(new NetworkRequirement(context));
builder.withRetryCount(5);
return builder.create();
}
示例2: MultiDeviceBlockedUpdateJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public MultiDeviceBlockedUpdateJob(Context context) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(MultiDeviceBlockedUpdateJob.class.getSimpleName())
.withPersistence()
.create());
}
示例3: MultiDeviceGroupUpdateJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public MultiDeviceGroupUpdateJob(Context context) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(MultiDeviceGroupUpdateJob.class.getSimpleName())
.withPersistence()
.create());
}
示例4: SmsSentJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public SmsSentJob(Context context, long messageId, String action, int result) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withRequirement(new MasterSecretRequirement(context))
.create());
this.messageId = messageId;
this.action = action;
this.result = result;
}
示例5: CreateSignedPreKeyJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public CreateSignedPreKeyJob(Context context) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(CreateSignedPreKeyJob.class.getSimpleName())
.create());
}
示例6: MultiDeviceContactUpdateJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public MultiDeviceContactUpdateJob(Context context, long recipientId) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(MultiDeviceContactUpdateJob.class.getSimpleName())
.withPersistence()
.create());
this.recipientId = recipientId;
}
示例7: RefreshPreKeysJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public RefreshPreKeysJob(Context context) {
super(context, JobParameters.newBuilder()
.withGroupId(RefreshPreKeysJob.class.getSimpleName())
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withRetryCount(5)
.create());
}
示例8: constructParameters
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
private static JobParameters constructParameters(Context context, String name) {
JobParameters.Builder builder = JobParameters.newBuilder()
.withPersistence()
.withRequirement(new MasterSecretRequirement(context))
.withRetryCount(15)
.withGroupId(name);
if (TextSecurePreferences.isWifiSmsEnabled(context)) {
builder.withRequirement(new NetworkOrServiceRequirement(context));
} else {
builder.withRequirement(new ServiceRequirement(context));
}
return builder.create();
}
示例9: PushGroupSendJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public PushGroupSendJob(Context context, long messageId, String destination, long filterRecipientId,
Recipients destRecipients) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withGroupId(destination)
.withRequirement(new MasterSecretRequirement(context))
.withRequirement(new NetworkRequirement(context))
.withRetryCount(5)
.create());
this.messageId = messageId;
this.filterRecipientId = filterRecipientId;
this.destRecipients = destRecipients;
}
示例10: MmsSendJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public MmsSendJob(Context context, long messageId) {
super(context, JobParameters.newBuilder()
.withGroupId("mms-operation")
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withPersistence()
.create());
this.messageId = messageId;
}
示例11: AttachmentDownloadJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public AttachmentDownloadJob(Context context, long messageId, AttachmentId attachmentId) {
super(context, JobParameters.newBuilder()
.withGroupId(AttachmentDownloadJob.class.getCanonicalName())
.withRequirement(new MasterSecretRequirement(context))
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MediaNetworkRequirement(context, messageId, attachmentId))
.withPersistence()
.create());
this.messageId = messageId;
this.partRowId = attachmentId.getRowId();
this.partUniqueId = attachmentId.getUniqueId();
}
示例12: RotateSignedPreKeyJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public RotateSignedPreKeyJob(Context context) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withRetryCount(5)
.create());
}
示例13: MmsDownloadJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public MmsDownloadJob(Context context, long messageId, long threadId, boolean automatic) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withRequirement(new MasterSecretRequirement(context))
.withRequirement(new NetworkRequirement(context))
.withGroupId("mms-operation")
.withWakeLock(true, 30, TimeUnit.SECONDS)
.create());
this.messageId = messageId;
this.threadId = threadId;
this.automatic = automatic;
}
示例14: CleanPreKeysJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public CleanPreKeysJob(Context context) {
super(context, JobParameters.newBuilder()
.withGroupId(CleanPreKeysJob.class.getSimpleName())
.withRequirement(new MasterSecretRequirement(context))
.withRetryCount(5)
.create());
}
示例15: MultiDeviceReadUpdateJob
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; //导入依赖的package包/类
public MultiDeviceReadUpdateJob(Context context, List<SyncMessageId> messageIds) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withPersistence()
.create());
this.messageIds = new LinkedList<>();
for (SyncMessageId messageId : messageIds) {
this.messageIds.add(new SerializableSyncMessageId(messageId.getAddress(), messageId.getTimetamp()));
}
}