Example #1
0
 public void saveState() {
   try {
     final File stateFile = new File(Config.PodcastsRoot, "state.dat");
     location = Location.save(stateFile, currentTitle());
   } catch (Throwable e) {
     // bummer.
   }
 }
Example #2
0
 public void restoreState() {
   final File stateFile = new File(Config.PodcastsRoot, "state.dat");
   if (!stateFile.exists()) {
     location = null;
     return;
   }
   try {
     if (location == null) {
       location = Location.load(stateFile);
     }
     tryToRestoreLocation();
   } catch (Throwable e) {
     // bummer.
   }
 }