Commit ced07319 authored by fallenstardust's avatar fallenstardust

fix

parent 242fc03c
......@@ -109,9 +109,7 @@ public class MainActivity extends HomeActivity{
protected void onDestroy() {
YGOStarter.onDestroy(this);
super.onDestroy();
if(mResCheckTask != null) {
mResCheckTask.unregisterMReceiver();
}
mResCheckTask.unregisterMReceiver();
}
......@@ -141,11 +139,11 @@ public class MainActivity extends HomeActivity{
@Override
protected void checkResourceDownload(ResCheckListener listener) {
ResCheckTask task = new ResCheckTask(this, listener);
mResCheckTask = new ResCheckTask(this, listener);
if (Build.VERSION.SDK_INT >= 11) {
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
mResCheckTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
task.execute();
mResCheckTask.execute();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment