Remove selected_track_id_key.

This commit is contained in:
Jimmy Shih
2013-05-29 11:23:08 -07:00
parent aafe93b723
commit 0a0753c4c5
6 changed files with 11 additions and 35 deletions
@@ -156,7 +156,6 @@ public class TrackDataHub implements DataSourceListener {
return;
}
selectedTrackId = trackId;
PreferencesUtils.setLong(context, R.string.selected_track_id_key, selectedTrackId);
loadDataForAll();
}
});
@@ -259,17 +258,6 @@ public class TrackDataHub implements DataSourceListener {
runInHanderThread(new Runnable() {
@Override
public void run() {
if (key == null
|| key.equals(PreferencesUtils.getKey(context, R.string.selected_track_id_key))) {
long trackId = PreferencesUtils.getLong(context, R.string.selected_track_id_key);
boolean hasChanged = trackId != selectedTrackId;
selectedTrackId = trackId;
if (key != null) {
if (hasChanged) {
loadDataForAll();
}
}
}
if (key == null
|| key.equals(PreferencesUtils.getKey(context, R.string.recording_track_id_key))) {
recordingTrackId = PreferencesUtils.getLong(context, R.string.recording_track_id_key);
@@ -61,7 +61,6 @@ public class PreferenceBackupHelper {
doNotBackup.add(context.getString(R.string.google_account_key));
doNotBackup.add(context.getString(R.string.recording_track_id_key));
doNotBackup.add(context.getString(R.string.recording_track_paused_key));
doNotBackup.add(context.getString(R.string.selected_track_id_key));
}
/**
@@ -34,10 +34,10 @@ public interface TrackPath {
/**
* Updates state.
*
* @param tripstatistics the trip statistics
* @param tripStatistics the trip statistics
* @return true if the state is updated.
*/
public boolean updateState(TripStatistics tripStatistrics);
public boolean updateState(TripStatistics tripStatistics);
/**
* Updates the path.