public void handleMessage(android.os.Message msg) { switch (msg.what) { case TimeChecker.TIME_OUT: pDialog.pDialogHide(); showShortToast(ConstantsPromptMessages.NETWORK_POOR); if (loginAsyncTask != null && loginAsyncTask.getStatus() != Status.FINISHED) { loginAsyncTask.cancel(true); loginAsyncTask = null; } break; } };