mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-04 02:13:07 +02:00
Making TrackDataHub an application singleton (using the application context to ensure we don't leak MyTracks).
This commit is contained in:
@@ -128,7 +128,7 @@ public class MyTracks extends TabActivity implements OnTouchListener {
|
||||
|
||||
providerUtils = MyTracksProviderUtils.Factory.get(this);
|
||||
preferences = getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||
dataHub = new TrackDataHub(this, preferences, providerUtils);
|
||||
dataHub = TrackDataHub.getInstance(this);
|
||||
menuManager = new MenuManager(this);
|
||||
serviceBinder = TrackRecordingServiceBinder.getInstance(this);
|
||||
|
||||
@@ -174,15 +174,6 @@ public class MyTracks extends TabActivity implements OnTouchListener {
|
||||
Eula.showEulaRequireAcceptance(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
Log.d(TAG, "MyTracks.onDestroy");
|
||||
|
||||
dataHub.destroy();
|
||||
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
Log.d(TAG, "MyTracks.onStop");
|
||||
|
||||
Reference in New Issue
Block a user