Source:
<code>private void postDescription(@NonNull String editToken) { <START> disposables.add(ServiceFactory.get(wikiData).postDescriptionEdit(languageCode, pageTitle.getWikiSite().dbName(), <END> pageTitle.getPrefixedText(), editView.getDescription(), editToken, AccountUtil.isLoggedIn() ? "user" : null) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(response -> { if (response.getSuccessVal() > 0) { new Handler().postDelayed(successRunnable, TimeUnit.SECONDS.toMillis(4)); if (funnel != null) { funnel.logSaved(); } } else { editFailed(RetrofitException.unexpectedError(new RuntimeException( "Received unrecognized description edit response")), true); } }, caught -> { if (caught instanceof MwException) { MwServiceError error = ((MwException) caught).getError(); if (error.badLoginState() || error.badToken()) { getEditTokenThenSave(true); } else if (error.hasMessageName(ABUSEFILTER_DISALLOWED) || error.hasMessageName(ABUSEFILTER_WARNING)) { String code = error.hasMessageName(ABUSEFILTER_DISALLOWED) ? ABUSEFILTER_DISALLOWED : ABUSEFILTER_WARNING; String info = error.getMessageHtml(code); editView.setSaveState(false); if (info != null) { editView.setError(StringUtil.fromHtml(info)); } if (funnel != null) { funnel.logAbuseFilterWarning(code); } } else { editFailed(caught, true); } } else { editFailed(caught, true); } })); }</code><technical_language>Ideally put a call siteInfo() this observable chain, runs in background, feed result postDescriptionEdit()</technical_language>

Target:
private void postDescription(@NonNull String editToken) { disposables.add(ServiceFactory.get(pageTitle.getWikiSite()).getSiteInfo() .flatMap(response -> { String languageCode = response.query().siteInfo() != null && response.query().siteInfo().lang() != null && !response.query().siteInfo().hasVariants() ? response.query().siteInfo().lang() : pageTitle.getWikiSite().languageCode(); return ServiceFactory.get(wikiData).postDescriptionEdit(languageCode, pageTitle.getWikiSite().languageCode(), pageTitle.getWikiSite().dbName(), pageTitle.getPrefixedText(), editView.getDescription(), editToken, AccountUtil.isLoggedIn() ? "user" : null); }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(response -> { if (response.getSuccessVal() > 0) { new Handler().postDelayed(successRunnable, TimeUnit.SECONDS.toMillis(4)); if (funnel != null) { funnel.logSaved(); } } else { editFailed(RetrofitException.unexpectedError(new RuntimeException( "Received unrecognized description edit response")), true); } }, caught -> { if (caught instanceof MwException) { MwServiceError error = ((MwException) caught).getError(); if (error.badLoginState() || error.badToken()) { getEditTokenThenSave(true); } else if (error.hasMessageName(ABUSEFILTER_DISALLOWED) || error.hasMessageName(ABUSEFILTER_WARNING)) { String code = error.hasMessageName(ABUSEFILTER_DISALLOWED) ? ABUSEFILTER_DISALLOWED : ABUSEFILTER_WARNING; String info = error.getMessageHtml(code); editView.setSaveState(false); if (info != null) { editView.setError(StringUtil.fromHtml(info)); } if (funnel != null) { funnel.logAbuseFilterWarning(code); } } else { editFailed(caught, true); } } else { editFailed(caught, true); } })); }