public void saveState() { try { final File stateFile = new File(Config.PodcastsRoot, "state.dat"); location = Location.save(stateFile, currentTitle()); } catch (Throwable e) { // bummer. } }
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. } }