Created
March 25, 2015 08:13
-
-
Save deepankarb/845d4c4e1cb89ee9db61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void cancelAsyncTask(AsyncTask<?, ?, ?> task) { | |
if (task == null) { | |
return; | |
} | |
if (!task.getStatus().equals(AsyncTask.Status.FINISHED)) { | |
Logger.debug(TAG, "Cancelling AsyncTask " + task.toString() ); | |
task.cancel(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment