@Override protected void onPostExecute(Object o) { if (showLoading) { if ((loading != null) && loading.isShowing()) { loading.dismiss(); } } if (error) { onComplete.onError(); } else { onComplete.onFinish(values); } super.onPostExecute(o); }
public void ChangeParams( String login, String password, Activity activity, OnComplete onComplete) { boolean status = GetStatus(); if (login.isEmpty() || password.isEmpty()) { onComplete.Error(activity.getBaseContext().getString(R.string.error_empty_field)); } else { options.setParams(login, password); if (status) { options.setNotificationId(""); onComplete.Complete(); } else { pushNotification.register( activity, Options.SENDER_ID, options.getNotificationId(), onComplete); } } }