Esempio n. 1
0
 public void setCurrentRaidId(String currentRaidId) {
   boolean changed = setValue(CURRENT_RAID_ID, currentRaidId);
   if (changed) {
     if (TerminalDB.getConnectedInstance() != null) {
       DistancesRegistry.getInstance().refresh();
       TeamsRegistry.getInstance().refresh();
       UsersRegistry.getInstance().refresh();
     }
   }
 }
Esempio n. 2
0
 public void setPathToTerminalDB(String pathToTerminalDB) {
   boolean changed = setValue(PATH_TO_TERMINAL_DB, pathToTerminalDB);
   if (changed) {
     TerminalDB.getRawInstance().closeConnection();
     // reconnect in getInstance
     TerminalDB.getRawInstance().tryConnectToDB();
     if (TerminalDB.getRawInstance().isConnected()) {
       DistancesRegistry.getInstance().refresh();
       TeamsRegistry.getInstance().refresh();
       UsersRegistry.getInstance().refresh();
     }
   }
 }
Esempio n. 3
0
 public void setPathToDB(String pathToDB) {
   boolean changed = setValue(PATH_TO_DB, pathToDB);
   if (changed) {
     SQLiteDatabaseAdapter.getRawInstance().closeConnection();
     // reconnect in getInstance
     SQLiteDatabaseAdapter.getRawInstance().tryConnectToDB();
     if (SQLiteDatabaseAdapter.getRawInstance().isConnected()) {
       DistancesRegistry.getInstance().refresh();
       TeamsRegistry.getInstance().refresh();
       UsersRegistry.getInstance().refresh();
     }
   }
 }
Esempio n. 4
0
 public void setCurrentRaidId(String currentRaidId) {
   boolean changed = setValue(CURRENT_RAID_ID, currentRaidId);
   if (changed) {
     if (SQLiteDatabaseAdapter.getConnectedInstance() != null) {
       DistancesRegistry.getInstance().refresh();
       ScanPointsRegistry.getInstance().refresh();
       TeamsRegistry.getInstance().refresh();
       UsersRegistry.getInstance().refresh();
       Log.d(
           "SETTINGS",
           "current raid ID: " + ConfigurationAdapter.getInstance().getCurrentRaidId());
     }
   }
 }