mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +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,
|
||||
TrustNewIdentity.ON_FIRST_USE);
|
||||
|
||||
Manager m = null;
|
||||
ManagerImpl m = null;
|
||||
try {
|
||||
m = new Manager(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||
m = new ManagerImpl(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||
|
||||
logger.debug("Refreshing pre keys");
|
||||
try {
|
||||
|
@ -178,7 +178,7 @@ public class ProvisioningManager {
|
|||
return false;
|
||||
}
|
||||
|
||||
final var m = new Manager(signalAccount, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||
final var m = new ManagerImpl(signalAccount, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||
try (m) {
|
||||
m.checkAccountState();
|
||||
} catch (AuthorizationFailedException ignored) {
|
||||
|
|
|
@ -177,9 +177,9 @@ public class RegistrationManager implements Closeable {
|
|||
//accountManager.setGcmId(Optional.of(GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID)));
|
||||
account.finishRegistration(UuidUtil.parseOrNull(response.getUuid()), masterKey, pin);
|
||||
|
||||
Manager m = null;
|
||||
ManagerImpl m = null;
|
||||
try {
|
||||
m = new Manager(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||
m = new ManagerImpl(account, pathConfig, serviceEnvironmentConfig, userAgent);
|
||||
account = null;
|
||||
|
||||
m.refreshPreKeys();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue