Sorry yes it is API 13, I turned around the logic of the code when I
glanced at it:
// If the app is Honeycomb MR1 or earlier, switch its AsyncTask
// implementation to use the pool executor. Normally, we use the
// serialized executor as the default. This has to happen in the
// main thread so the main looper is set right.
if (data.appInfo.targetSdkVersion <=
android.os.Build.VERSION_CODES.HONEYCOMB_MR1) {
AsyncTask.setDefaultExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
On Fri, Apr 20, 2012 at 2:31 PM, Mark Murphy <[email protected]>wrote:
> On Fri, Apr 20, 2012 at 5:24 PM, Dianne Hackborn <[email protected]>
> wrote:
> > Yes if your targetSdkVersion is >= 12, then as of that release the
> default
> > executor is serial.
>
> Bingo! It's the targetSdkVersion that's controlling the behavior.
> Looking at the AsyncTask source code, I can't quite see how that's
> happening, but at least I can confirm the results.
>
> Though for me, the serialized behavior does not kick in until a
> targetSdkVersion of 13 -- 12 still gives me parallel operation.
>
> Thanks for the clarification!
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.7 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
Dianne Hackborn
Android framework engineer
[email protected]
Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails. All such
questions should be posted on public forums, where I and others can see and
answer them.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en