forked from upstream-mirrors/OpenTracks
Backing out unpushed ef8239961ed3 to merge with newest TrackDataHub.
This commit is contained in:
@@ -240,7 +240,6 @@ public class TrackDataHub {
|
|||||||
*/
|
*/
|
||||||
public void start() {
|
public void start() {
|
||||||
Log.i(TAG, "TrackDataHub.start");
|
Log.i(TAG, "TrackDataHub.start");
|
||||||
synchronized (this) {
|
|
||||||
if (startedInstance != null) {
|
if (startedInstance != null) {
|
||||||
Log.w(TAG, "Already started, ignoring");
|
Log.w(TAG, "Already started, ignoring");
|
||||||
return;
|
return;
|
||||||
@@ -257,7 +256,6 @@ public class TrackDataHub {
|
|||||||
// we already had external listeners.
|
// we already had external listeners.
|
||||||
dataSourceManager.updateAllListeners(getNeededListenerTypes());
|
dataSourceManager.updateAllListeners(getNeededListenerTypes());
|
||||||
loadSharedPreferences();
|
loadSharedPreferences();
|
||||||
}
|
|
||||||
|
|
||||||
// If there were listeners already registered, make sure they become up-to-date.
|
// If there were listeners already registered, make sure they become up-to-date.
|
||||||
loadDataForAllListeners();
|
loadDataForAllListeners();
|
||||||
@@ -288,7 +286,6 @@ public class TrackDataHub {
|
|||||||
*/
|
*/
|
||||||
public void stop() {
|
public void stop() {
|
||||||
Log.i(TAG, "TrackDataHub.stop");
|
Log.i(TAG, "TrackDataHub.stop");
|
||||||
synchronized (this) {
|
|
||||||
if (!isStarted()) {
|
if (!isStarted()) {
|
||||||
Log.w(TAG, "Not started, ignoring");
|
Log.w(TAG, "Not started, ignoring");
|
||||||
return;
|
return;
|
||||||
@@ -305,7 +302,6 @@ public class TrackDataHub {
|
|||||||
listenerHandlerThread = null;
|
listenerHandlerThread = null;
|
||||||
listenerHandler = null;
|
listenerHandler = null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isStarted() {
|
private boolean isStarted() {
|
||||||
return startedInstance != null;
|
return startedInstance != null;
|
||||||
|
|||||||
Reference in New Issue
Block a user