Source:
<code>private void savePostAndOptionallyFinish(final boolean doFinish, final boolean forceSave) { new Thread(new Runnable() { @Override public void run() { boolean isFirstTimePublish = isFirstTimePublish(false); boolean postUpdateSuccessful = updatePostObject(); if (!postUpdateSuccessful) { return; } boolean isPublishable = PostUtils.isPublishable(mPost); boolean shouldSave = shouldSavePost() || forceSave; boolean shouldSync = isPublishable || !isNewPost(); if (doFinish) { saveResult(shouldSave && shouldSync, isDiscardable(), false); } definitelyDeleteBackspaceDeletedMediaItems(); if (shouldSave) { PostStatus status = PostStatus.fromPost(mPost); boolean isNotRestarting = mRestartEditorOption == RestartEditorOptions.NO_RESTART; if ((status == PostStatus.DRAFT || status == PostStatus.PENDING) && isPublishable && !hasFailedMedia() && NetworkUtils.isNetworkAvailable(getBaseContext()) <START> && isNotRestarting && mSite.isUsingWpComRestApi()) { <END> mPostEditorAnalyticsSession.setOutcome(Outcome.SAVE); savePostOnlineAndFinishAsync(isFirstTimePublish, doFinish); } else { mPostEditorAnalyticsSession.setOutcome(Outcome.SAVE); if (forceSave) { savePostOnlineAndFinishAsync(false, false); } else { savePostLocallyAndFinishAsync(doFinish); } } } else { if (isDiscardable()) { mDispatcher.dispatch(PostActionBuilder.newRemovePostAction(mPost)); } removePostOpenInEditorStickyEvent(); if (doFinish) { mPostEditorAnalyticsSession.setOutcome(Outcome.CANCEL); finish(); } } } }).start(); }</code><technical_language>a bit worried test fact savePostOnlineAndFinishAsync route a remote-auto-save. Is this function called in other places for hosted sites? save local drafts online for hosted sites (unless user tap "Save" calls EditPostActivity.uploadPost directly)</technical_language>

Target:
private void savePostAndOptionallyFinish(final boolean doFinish, final boolean forceSave) { new Thread(new Runnable() { @Override public void run() { boolean isFirstTimePublish = isFirstTimePublish(false); boolean postUpdateSuccessful = updatePostObject(); if (!postUpdateSuccessful) { return; } boolean isPublishable = PostUtils.isPublishable(mPost); boolean shouldSave = shouldSavePost() || forceSave; boolean shouldSync = isPublishable || !isNewPost(); if (doFinish) { saveResult(shouldSave && shouldSync, isDiscardable(), false); } definitelyDeleteBackspaceDeletedMediaItems(); if (shouldSave) { boolean isNotRestarting = mRestartEditorOption == RestartEditorOptions.NO_RESTART; boolean isWpComOrIsLocalDraft = mSite.isUsingWpComRestApi() || mPost.isLocalDraft(); if (isPublishable && !hasFailedMedia() && NetworkUtils.isNetworkAvailable(getBaseContext()) && isNotRestarting && isWpComOrIsLocalDraft) { mPostEditorAnalyticsSession.setOutcome(Outcome.SAVE); savePostOnlineAndFinishAsync(isFirstTimePublish, doFinish); } else { mPostEditorAnalyticsSession.setOutcome(Outcome.SAVE); if (forceSave) { savePostOnlineAndFinishAsync(false, false); } else { savePostLocallyAndFinishAsync(doFinish); } } } else { if (isDiscardable()) { mDispatcher.dispatch(PostActionBuilder.newRemovePostAction(mPost)); } removePostOpenInEditorStickyEvent(); if (doFinish) { mPostEditorAnalyticsSession.setOutcome(Outcome.CANCEL); finish(); } } } }).start(); }