RunManager.isTrackingRun()


#1

In listing 34.23 two calls are made to isTrackingRun(mRun)

isTrackingRun as written earlier does not take a parameter.

The sample code in the download file includes this method:

public boolean isTrackingRun(Run run) { return run != null && run.getId() == mCurrentRunId; }
I believe this is missing from the book.


#2

I believe you’re right. I’ll be sure this gets added to the errata.

Thanks for the report!


#3

It’s July and a solution hasn’t been updated in the errata. What’s the holdup?


#4

Ahh, I assumed that Brian would take care of it. Added!


#5

To be clear, are we supposed to remove the mRun parameter from the isTrackingRun(mRun)?


#6

The fix is to include the method quoted above by pmcconnell, so that you will have one version with a Run parameter and one without (Both are used in different places.).