public void run() { thread = Thread.currentThread(); su.setInProgress(true); runTask(); cleanUp(); }
/** {@inheritDoc} */ @Override public void uploadImage( String message, String filePath, final SocialCallbacks.SocialActionListener socialActionListener) { if (!isInitialized) { return; } SoomlaUtils.LogDebug(TAG, "uploadImage"); RefProvider = getProvider(); RefSocialActionListener = socialActionListener; preformingAction = ACTION_UPLOAD_IMAGE; try { StatusUpdate updateImage = new StatusUpdate(message); updateImage.media(new File(filePath)); twitter.updateStatus(updateImage); } catch (Exception e) { failListener(ACTION_UPLOAD_IMAGE, e.getMessage()); } }
void error(StatusUpdate su, String message) { status(su, StatusUpdate.LEVEL_GENERIC, message); su.error(message); }
void status(StatusUpdate su, int level, String message) { Log.log(Log.LEVEL_INFO, MODULE, message); su.updateProgressStatus(level, message); }
public void cleanUp() { su.setInProgress(false); terminated = true; }