forked from Mirrorlandia_minetest/minetest
Fix misuse of AsyncTask (#8799)
This commit is contained in:
parent
4271889ef8
commit
6a7f5c0985
@ -53,6 +53,14 @@ public class MinetestAssetCopy extends Activity {
|
|||||||
super.onResume();
|
super.onResume();
|
||||||
makeFullScreen();
|
makeFullScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
if (m_AssetCopy != null) {
|
||||||
|
m_AssetCopy.cancel(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void makeFullScreen() {
|
public void makeFullScreen() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
@ -77,7 +85,7 @@ public class MinetestAssetCopy extends Activity {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class copyAssetTask extends AsyncTask<String, Integer, String> {
|
private static class copyAssetTask extends AsyncTask<String, Integer, String> {
|
||||||
boolean m_copy_started = false;
|
boolean m_copy_started = false;
|
||||||
String m_Foldername = "media";
|
String m_Foldername = "media";
|
||||||
Vector<String> m_foldernames;
|
Vector<String> m_foldernames;
|
||||||
|
Loading…
Reference in New Issue
Block a user