Skip to content
Permalink
Browse files

Fix misuse of AsyncTask (#8799)

  • Loading branch information
pangeneral authored and sfan5 committed Sep 18, 2019
1 parent 4271889 commit 6a7f5c09852e06b2204cda67583de84e895fb78a
Showing with 9 additions and 1 deletion.
  1. +9 −1 build/android/src/main/java/net.minetest.minetest/MinetestAssetCopy.java
@@ -53,6 +53,14 @@ protected void onResume() {
super.onResume();
makeFullScreen();
}

@Override
protected void onDestroy() {
super.onDestroy();
if (m_AssetCopy != null) {
m_AssetCopy.cancel(true);
}
}

public void makeFullScreen() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
@@ -77,7 +85,7 @@ public Object onRetainNonConfigurationInstance() {
return this;
}

private class copyAssetTask extends AsyncTask<String, Integer, String> {
private static class copyAssetTask extends AsyncTask<String, Integer, String> {
boolean m_copy_started = false;
String m_Foldername = "media";
Vector<String> m_foldernames;

0 comments on commit 6a7f5c0

Please sign in to comment.
You can’t perform that action at this time.