mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Extract Manager interface
This commit is contained in:
parent
1a81bbecbb
commit
b91c162159
4 changed files with 1324 additions and 1060 deletions
File diff suppressed because it is too large
Load diff
1240
lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java
Normal file
1240
lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java
Normal file
File diff suppressed because it is too large
Load diff
|
@ -126,9 +126,9 @@ public class ProvisioningManager {
|
||||||
profileKey,
|
profileKey,
|
||||||
TrustNewIdentity.ON_FIRST_USE);
|
TrustNewIdentity.ON_FIRST_USE);
|
||||||
|
|
||||||
Manager m = null;
|
ManagerImpl m = null;
|
||||||
try {
|
try {
|
||||||
m = new Manager(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
m = new ManagerImpl(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||||
|
|
||||||
logger.debug("Refreshing pre keys");
|
logger.debug("Refreshing pre keys");
|
||||||
try {
|
try {
|
||||||
|
@ -178,7 +178,7 @@ public class ProvisioningManager {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final var m = new Manager(signalAccount, pathConfig, serviceEnvironmentConfig, userAgent);
|
final var m = new ManagerImpl(signalAccount, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||||
try (m) {
|
try (m) {
|
||||||
m.checkAccountState();
|
m.checkAccountState();
|
||||||
} catch (AuthorizationFailedException ignored) {
|
} catch (AuthorizationFailedException ignored) {
|
||||||
|
|
|
@ -177,9 +177,9 @@ public class RegistrationManager implements Closeable {
|
||||||
//accountManager.setGcmId(Optional.of(GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID)));
|
//accountManager.setGcmId(Optional.of(GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID)));
|
||||||
account.finishRegistration(UuidUtil.parseOrNull(response.getUuid()), masterKey, pin);
|
account.finishRegistration(UuidUtil.parseOrNull(response.getUuid()), masterKey, pin);
|
||||||
|
|
||||||
Manager m = null;
|
ManagerImpl m = null;
|
||||||
try {
|
try {
|
||||||
m = new Manager(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
m = new ManagerImpl(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||||
account = null;
|
account = null;
|
||||||
|
|
||||||
m.refreshPreKeys();
|
m.refreshPreKeys();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue