@Override public void onBackPressed() { if (mTask != null) { mTask.cancel(false); } super.onBackPressed(); }