mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-19 22:47:30 +00:00
7b589c4300
// FREEBIE
34 lines
883 B
Java
34 lines
883 B
Java
package org.thoughtcrime.securesms.dependencies;
|
|
|
|
import android.content.Context;
|
|
|
|
import org.thoughtcrime.securesms.crypto.storage.SignalProtocolStoreImpl;
|
|
import org.thoughtcrime.securesms.jobs.CleanPreKeysJob;
|
|
import org.whispersystems.libsignal.state.SignedPreKeyStore;
|
|
|
|
import dagger.Module;
|
|
import dagger.Provides;
|
|
|
|
@Module (complete = false, injects = {CleanPreKeysJob.class})
|
|
public class AxolotlStorageModule {
|
|
|
|
private final Context context;
|
|
|
|
public AxolotlStorageModule(Context context) {
|
|
this.context = context;
|
|
}
|
|
|
|
@Provides SignedPreKeyStoreFactory provideSignedPreKeyStoreFactory() {
|
|
return new SignedPreKeyStoreFactory() {
|
|
@Override
|
|
public SignedPreKeyStore create() {
|
|
return new SignalProtocolStoreImpl(context);
|
|
}
|
|
};
|
|
}
|
|
|
|
public static interface SignedPreKeyStoreFactory {
|
|
public SignedPreKeyStore create();
|
|
}
|
|
}
|