Beispiel #1
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();
     }
   }
 }
Beispiel #2
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());
     }
   }
 }