/** * Sends the result or a Constants.ERROR_CODE_CANCELED error if a result isn't present. */ public void finish() { if (mAccountAuthenticatorResponse != null) { // send the result bundle back if set, otherwise send an error. if (mResultBundle != null) { mAccountAuthenticatorResponse.onResult(mResultBundle); } else { mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED, "canceled"); } mAccountAuthenticatorResponse = null; } super.finish(); } }
@Override public void finish() { if (LOCAL_LOGV) Log.i(TAG, "finish()"); if (mCurrentTags == null) { setResult(RESULT_CANCELED); } else { // Update result intent Intent resultIntent = new Intent(); resultIntent.putExtra(KEY_TAGS, mCurrentTagString); setResult(RESULT_OK, resultIntent); // Submit datapoint associated with the ping if (mRowId >= 0) { Intent intent = new Intent(this, BeeminderService.class); intent.setAction(BeeminderService.ACTION_EDITPING); intent.putExtra(BeeminderService.KEY_PID, mRowId); intent.putExtra(BeeminderService.KEY_OLDTAGS, ""); intent.putExtra(BeeminderService.KEY_NEWTAGS, mCurrentTagString); this.startService(intent); } } TagTime.broadcastPingUpdate( false ); super.finish(); }
/** * Sends the result or a Constants.ERROR_CODE_CANCELED error if a result isn't present. */ public void finish() { if (mAccountAuthenticatorResponse != null) { // send the result bundle back if set, otherwise send an error. if (mResultBundle != null) { mAccountAuthenticatorResponse.onResult(mResultBundle); } else { mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED, "canceled"); } mAccountAuthenticatorResponse = null; } super.finish(); } }