create MyTracksApplication to keep global state like TrackDataHub

This commit is contained in:
Jimmy Shih
2011-09-22 11:25:27 -07:00
parent 4f9b6535fb
commit 43a1ec60ce
8 changed files with 49 additions and 37 deletions
@@ -146,7 +146,7 @@ public class MyTracks extends TabActivity implements OnTouchListener {
providerUtils = MyTracksProviderUtils.Factory.get(this);
preferences = getSharedPreferences(Constants.SETTINGS_NAME, 0);
dataHub = TrackDataHub.newInstance(this);
dataHub = ((MyTracksApplication) getApplication()).getTrackDataHub();
menuManager = new MenuManager(this);
serviceConnection = new TrackRecordingServiceConnection(this, serviceBindCallback);