mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 10:35:19 +00:00
0b20e99cd2
// FREEBIE
33 lines
1.1 KiB
Java
33 lines
1.1 KiB
Java
package org.thoughtcrime.securesms.dependencies;
|
|
|
|
import android.content.Context;
|
|
|
|
import org.thoughtcrime.redphone.signaling.RedPhoneAccountManager;
|
|
import org.thoughtcrime.redphone.signaling.RedPhoneTrustStore;
|
|
import org.thoughtcrime.securesms.BuildConfig;
|
|
import org.thoughtcrime.securesms.jobs.GcmRefreshJob;
|
|
import org.thoughtcrime.securesms.jobs.RefreshAttributesJob;
|
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|
|
|
import dagger.Module;
|
|
import dagger.Provides;
|
|
|
|
@Module(complete = false, injects = {GcmRefreshJob.class,
|
|
RefreshAttributesJob.class})
|
|
public class RedPhoneCommunicationModule {
|
|
|
|
private final Context context;
|
|
|
|
public RedPhoneCommunicationModule(Context context) {
|
|
this.context = context;
|
|
}
|
|
|
|
@Provides RedPhoneAccountManager provideRedPhoneAccountManager() {
|
|
return new RedPhoneAccountManager(BuildConfig.REDPHONE_MASTER_URL,
|
|
new RedPhoneTrustStore(context),
|
|
TextSecurePreferences.getLocalNumber(context),
|
|
TextSecurePreferences.getPushServerPassword(context));
|
|
}
|
|
|
|
}
|