2016-12-20 17:55:52 +00:00
|
|
|
package org.thoughtcrime.securesms.push;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.BuildConfig;
|
|
|
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|
|
|
import org.whispersystems.signalservice.api.SignalServiceAccountManager;
|
|
|
|
import org.whispersystems.signalservice.internal.push.SignalServiceUrl;
|
|
|
|
|
|
|
|
public class AccountManagerFactory {
|
|
|
|
|
|
|
|
public static SignalServiceAccountManager createManager(Context context) {
|
2016-12-30 04:54:05 +00:00
|
|
|
return new SignalServiceAccountManager(new SignalServiceNetworkAccess(context).getConfiguration(context),
|
2016-12-20 17:55:52 +00:00
|
|
|
TextSecurePreferences.getLocalNumber(context),
|
|
|
|
TextSecurePreferences.getPushServerPassword(context),
|
|
|
|
BuildConfig.USER_AGENT);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static SignalServiceAccountManager createManager(Context context, String number, String password) {
|
2016-12-30 04:54:05 +00:00
|
|
|
return new SignalServiceAccountManager(new SignalServiceNetworkAccess(context).getConfiguration(number),
|
2016-12-20 17:55:52 +00:00
|
|
|
number, password, BuildConfig.USER_AGENT);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|