Ver a proveniência

Use proper flag for waiting restoring bubble

pull/20/head
Kristijan Mitrovic há 4 anos
ascendente
cometimento
962d2b1301
1 ficheiros alterados com 6 adições e 3 eliminações
  1. +6
    -3
      bubble-server/src/main/java/bubble/server/BubbleConfiguration.java

+ 6
- 3
bubble-server/src/main/java/bubble/server/BubbleConfiguration.java Ver ficheiro

@@ -17,6 +17,7 @@ import bubble.model.cloud.BubbleNetworkState;
import bubble.model.cloud.BubbleNode;
import bubble.model.device.DeviceSecurityLevel;
import bubble.server.listener.BubbleFirstTimeListener;
import bubble.service.backup.RestoreService;
import bubble.service.boot.ActivationService;
import bubble.service.boot.StandardSelfNodeService;
import bubble.service.notify.LocalNotificationStrategy;
@@ -91,7 +92,7 @@ public class BubbleConfiguration extends PgRestServerConfiguration
public static final String TAG_REQUIRE_SEND_METRICS = "requireSendMetrics";
public static final String TAG_SUPPORT = "support";
public static final String TAG_SECURITY_LEVELS = "securityLevels";
public static final String TAG_RESTORE_MODE = "isInRestoringStatus";
public static final String TAG_RESTORE_MODE = "isWaitingRestoring";

public static final String DEFAULT_LOCAL_STORAGE_DIR = HOME_DIR + "/.bubble_local_storage";

@@ -283,11 +284,12 @@ public class BubbleConfiguration extends PgRestServerConfiguration
public Map<String, Object> getPublicSystemConfigs () {
synchronized (publicSystemConfigs) {
if (publicSystemConfigs.get() == null) {
final BubbleNode thisNode = getThisNode();
final BubbleNetwork thisNetwork = getThisNetwork();
final AccountDAO accountDAO = getBean(AccountDAO.class);
final CloudServiceDAO cloudDAO = getBean(CloudServiceDAO.class);
final ActivationService activationService = getBean(ActivationService.class);
final RestoreService restoreService = getBean(RestoreService.class);

publicSystemConfigs.set(MapBuilder.build(new Object[][]{
{TAG_ALLOW_REGISTRATION, thisNetwork == null ? null : thisNetwork.getBooleanTag(TAG_ALLOW_REGISTRATION, false)},
{TAG_NETWORK_UUID, thisNetwork == null ? null : thisNetwork.getUuid()},
@@ -303,7 +305,8 @@ public class BubbleConfiguration extends PgRestServerConfiguration
{TAG_LAUNCH_LOCK, isSageLauncher() || thisNetwork == null ? null : thisNetwork.launchLock()},
{TAG_RESTORE_MODE, thisNetwork == null
? false
: thisNetwork.getState().equals(BubbleNetworkState.restoring)},
: thisNetwork.getState().equals(BubbleNetworkState.restoring)
&& !restoreService.getRestoreKeys().exists(thisNetwork.getUuid())},
{TAG_SSL_PORT, getDefaultSslPort()},
{TAG_SUPPORT, getSupport()},
{TAG_SECURITY_LEVELS, DeviceSecurityLevel.values()}


Carregando…
Cancelar
Guardar