In many examples I have seen online, AsyncTask
is extended, the constructor is overriden, and super() isn't called. For example, in this answer by hackbod:
static class Worker extends AsyncTask<URL, Integer, Long> {
MyActivity mActivity;
Worker(MyActivity activity) {
mActivity = activity;
}
[...]
}
the new constructor does not call back to the parent's constructor.
There's similar code in this sample project by CommonsWare.
So is this correct? Or should super()
really be called?