I had commented out the part
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, args);
Thanks for pointing out AutofocusManager
I added
if (Build.VERSION.SDK_INT >= 11 ) {
// changed to 11 as Build.VERSION_CODES.HONEYCOMB is not
// accessible on android platform prior to 3.0
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, args);
} else {
task.execute(args);
}
in HoneycombAsyncTaskExecInterface
Now its working fine. Thanks @Sean Owen