Refactor: Remove overridden onBackPressed()

- onDestroy() already handles cancelling async tasks
This commit is contained in:
Aditya-Sood 2019-08-01 11:21:04 +05:30
parent 0a9126d940
commit c590ebabe9
2 changed files with 1 additions and 5 deletions

View File

@ -583,9 +583,4 @@ public class LocalFileTransferActivity extends AppCompatActivity implements
super.onDestroy();
cancelAsyncTasks();
}
@Override
public void onBackPressed() {
wifiDirectManager.closeLocalFileTransferActivity();
}
}

View File

@ -212,6 +212,7 @@ public class WifiDirectManager implements WifiP2pManager.ChannelListener, WifiP2
});
}
// TODO: Shift async tasks to WDM and handle cleanup from here itself
public void closeLocalFileTransferActivity() {
activity.cancelAsyncTasks();