[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Remove unused method and clean up getAPIForSite
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Remove unused method and clean up getAPIForSite .. Hygiene: Remove unused method and clean up getAPIForSite The getAPIForMobileSite method in WikipediaApp is no longer used now that Zero configs are fetched with Retrofit, as it is the only API call using the mobile subdomain. This removes it, and consolidates getAPIForSite into one method, since there is no longer any need to take mobile vs. non-mobile subdomain requests into account. No functional changes intended. Change-Id: Ibc4babd736033e741b41aa84753543e99d655197 --- M app/src/main/java/org/wikipedia/WikipediaApp.java 1 file changed, 1 insertion(+), 9 deletions(-) Approvals: jenkins-bot: Verified Niedzielski: Looks good to me, approved diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java b/app/src/main/java/org/wikipedia/WikipediaApp.java index db62d90..6d89fef 100644 --- a/app/src/main/java/org/wikipedia/WikipediaApp.java +++ b/app/src/main/java/org/wikipedia/WikipediaApp.java @@ -238,11 +238,7 @@ } public Api getAPIForSite(WikiSite wiki) { -return getAPIForSite(wiki, false); -} - -public Api getAPIForSite(WikiSite wiki, boolean mobile) { -String host = mobile ? wiki.mobileHost() : wiki.host(); +String host = wiki.host(); String acceptLanguage = getAcceptLanguage(wiki); MapcustomHeaders = buildCustomHeadersMap(acceptLanguage); Api api; @@ -258,10 +254,6 @@ api.setHeaderCheckListener(zeroHandler); return api; -} - -public Api getApiForMobileSite(WikiSite wiki) { -return getAPIForSite(wiki, true); } /** -- To view, visit https://gerrit.wikimedia.org/r/325311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc4babd736033e741b41aa84753543e99d655197 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Mholloway Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Remove unused method and clean up getAPIForSite
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/325311 Change subject: Hygiene: Remove unused method and clean up getAPIForSite .. Hygiene: Remove unused method and clean up getAPIForSite The getAPIForMobileSite method in WikipediaApp is no longer used now that Zero configs are fetched with Retrofit, as it is the only API call using the mobile subdomain. This removes it, and consolidates getAPIForSite into one method, since there is no longer any need to take mobile vs. non-mobile subdomain requests into account. No functional changes intended. Change-Id: Ibc4babd736033e741b41aa84753543e99d655197 --- M app/src/main/java/org/wikipedia/WikipediaApp.java 1 file changed, 1 insertion(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/11/325311/1 diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java b/app/src/main/java/org/wikipedia/WikipediaApp.java index db62d90..6d89fef 100644 --- a/app/src/main/java/org/wikipedia/WikipediaApp.java +++ b/app/src/main/java/org/wikipedia/WikipediaApp.java @@ -238,11 +238,7 @@ } public Api getAPIForSite(WikiSite wiki) { -return getAPIForSite(wiki, false); -} - -public Api getAPIForSite(WikiSite wiki, boolean mobile) { -String host = mobile ? wiki.mobileHost() : wiki.host(); +String host = wiki.host(); String acceptLanguage = getAcceptLanguage(wiki); MapcustomHeaders = buildCustomHeadersMap(acceptLanguage); Api api; @@ -258,10 +254,6 @@ api.setHeaderCheckListener(zeroHandler); return api; -} - -public Api getApiForMobileSite(WikiSite wiki) { -return getAPIForSite(wiki, true); } /** -- To view, visit https://gerrit.wikimedia.org/r/325311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc4babd736033e741b41aa84753543e99d655197 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Mholloway ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits