mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Revert stopgaps related to beta server cert issue (#3396)
* Revert stopgaps related to beta server cert issue The upstream issue with Commons beta server has been fixed now[1]. So, there's no point in stopgapping the issue anymore. So, revert the related changes. This revertsfa87eb5661anddf426f7c42which correspond to PRs #3350 and #3349 respectively. [1]: https://phabricator.wikimedia.org/T243881#5861983 * Test-fix: fix the failing CI test
This commit is contained in:
parent
4bd7a5b1e2
commit
a78e167676
5 changed files with 11 additions and 293 deletions
|
|
@ -16,10 +16,6 @@ import androidx.annotation.NonNull;
|
|||
import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
import com.facebook.imagepipeline.core.ImagePipeline;
|
||||
import com.facebook.imagepipeline.core.ImagePipelineConfig;
|
||||
import com.facebook.imagepipeline.producers.Consumer;
|
||||
import com.facebook.imagepipeline.producers.FetchState;
|
||||
import com.facebook.imagepipeline.producers.NetworkFetcher;
|
||||
import com.facebook.imagepipeline.producers.ProducerContext;
|
||||
import com.mapbox.mapboxsdk.Mapbox;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
import com.squareup.leakcanary.RefWatcher;
|
||||
|
|
@ -58,7 +54,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
|||
import io.reactivex.internal.functions.Functions;
|
||||
import io.reactivex.plugins.RxJavaPlugins;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.OkHttpClient;
|
||||
import timber.log.Timber;
|
||||
|
||||
import static fr.free.nrw.commons.data.DBOpenHelper.CONTRIBUTIONS_TABLE;
|
||||
|
|
@ -94,9 +89,6 @@ public class CommonsApplication extends Application {
|
|||
|
||||
@Inject @Named("default_preferences") JsonKvStore defaultPrefs;
|
||||
|
||||
@Inject
|
||||
OkHttpClient okHttpClient;
|
||||
|
||||
/**
|
||||
* Constants begin
|
||||
*/
|
||||
|
|
@ -162,15 +154,9 @@ public class CommonsApplication extends Application {
|
|||
}
|
||||
|
||||
// Set DownsampleEnabled to True to downsample the image in case it's heavy
|
||||
ImagePipelineConfig.Builder imagePipelineConfigBuilder = ImagePipelineConfig.newBuilder(this)
|
||||
.setDownsampleEnabled(true);
|
||||
|
||||
if(ConfigUtils.isBetaFlavour()){
|
||||
NetworkFetcher networkFetcher=new CustomNetworkFetcher(okHttpClient);
|
||||
imagePipelineConfigBuilder.setNetworkFetcher(networkFetcher);
|
||||
}
|
||||
|
||||
ImagePipelineConfig config = imagePipelineConfigBuilder.build();
|
||||
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
|
||||
.setDownsampleEnabled(true)
|
||||
.build();
|
||||
try {
|
||||
Fresco.initialize(this, config);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue