Skip to content

Commit

Permalink
Fix misuse of AsyncTask (#8799)
Browse files Browse the repository at this point in the history
  • Loading branch information
pangeneral authored and sfan5 committed Sep 18, 2019
1 parent 4271889 commit 6a7f5c0
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 6a7f5c0

Please sign in to comment.