Decouple from the data-client service factory, with some code cleanup in the process (#5496)

This commit is contained in:
Paul Hawke 2024-01-29 16:46:01 -06:00 committed by GitHub
parent 7ec2a22fce
commit ab9e57f5be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 75 additions and 71 deletions

View file

@ -5,7 +5,6 @@ import fr.free.nrw.commons.wikidata.WikidataConstants;
import okhttp3.OkHttpClient;
import org.wikipedia.AppAdapter;
import org.wikipedia.dataclient.SharedPreferenceCookieManager;
import org.wikipedia.dataclient.WikiSite;
import org.wikipedia.dataclient.okhttp.TestStubInterceptor;
import org.wikipedia.dataclient.okhttp.UnsuccessfulResponseInterceptor;
@ -22,7 +21,7 @@ public class TestAppAdapter extends AppAdapter {
}
@Override
public OkHttpClient getOkHttpClient(@NonNull WikiSite wikiSite) {
public OkHttpClient getOkHttpClient() {
return new OkHttpClient.Builder()
.addInterceptor(new UnsuccessfulResponseInterceptor())
.addInterceptor(new TestStubInterceptor())