Efficient Android Threading

Errata for Efficient Android Threading

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
ePub
Page -
Basic Message Passing

In the code snippet under Basic Message Passing LooperActivity contains a static inner class "private static class LooperThread extends Thread", method of this class is calling a function in the outer class named "doLongRunningOperation". static inner classes donot have implicit access to outer class methods. Thanks

Note from the Author or Editor:
The method doLongRunningOperation should be included in the LooperThread class. Change to be made: Move ------ private void doLongRunningOperation() { // Add long running operation here. } ------ so that it comes after ----- Looper.loop(); } -----

Anonymous  Jun 15, 2014 
ePub
Figure 9-1. Thread pool lifecycle

The names of some states in the figure are misprinted: New -> Running, Runnable -> Shutdown.

Note from the Author or Editor:
Page 143, error in image 9-1. New -> Running Runnable -> Shutdown

Anonymous  Sep 27, 2014 
Mobi
Task Management - Submitting Tasks - invokeAny

In the last paragraph and Note, the function invokeAny() is misprinted as invokeAll().

Note from the Author or Editor:
Page 151: Last paragraph of the "invokeAny" section. Change "invokeAll stops blocking," to "invokeAny stops blocking," Page 151: Note - Change "Tasks added with invokeAll" to "Tasks added with invokeAny".

Anonymous  Sep 28, 2014 
Printed, PDF, ePub, Mobi
Sample code of ECSImageDownloaderActivity

The mark of the seventh note is placed on the definition of addImage(), but should be on ecs.shutdown().

Note from the Author or Editor:
Page 154: The mark of the seventh note is placed on the definition of addImage(), but should be on ecs.shutdown().

Anonymous  Sep 28, 2014 
PDF
Page 22
Example code in 5th bullet

The line: synchronized(this.getClass()) { should be changed to: synchronized(MyClass.class) {

Anders Goransson
Anders Goransson
O'Reilly Author 
Sep 14, 2014 
Printed
Page 25
Example code

In the code example remove "Thread t1 = " and "Thread t2 ="

Anders Goransson
Anders Goransson
O'Reilly Author 
Sep 14, 2014 
PDF
Page 43
Example code

There is a missing exclamation mark before an expression, which makes the example invalid: Thread.currentThread().isInterrupted() should be prefixed with an exclamation mark, like this: !Thread.currentThread().isInterrupted()

Anders Goransson
Anders Goransson
O'Reilly Author 
Jun 15, 2014 
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 75
Chapter introduction, last bullet

Remove the last bullet, as that part has moved to another chapter. "• Returning data with ResultReceiver"

Anders Goransson
Anders Goransson
O'Reilly Author 
Oct 21, 2014 
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 202
Code example has two errors: One in doPost()- and one in doGet()-method

In doPost()-method add the following line after intent.setData(Uri.parse(postUrl));: intent.putExtra(WebService.INTENT_KEY_REQUEST_TYPE, WebService.POST); ################### In doGet()-method add the following line after intent.setData(Uri.parse(getUrl));: intent.putExtra(WebService.INTENT_KEY_REQUEST_TYPE, WebService.GET);

Anders Goransson
Anders Goransson
O'Reilly Author 
Oct 17, 2014