From 8131c5c2eab93aee56a5984f45a1b55058b2bd8e Mon Sep 17 00:00:00 2001 From: Ahmad Vazirna Date: Mon, 18 Sep 2023 13:48:34 +0200 Subject: [PATCH] Apply custom HTTP coniguration during CC app initialization --- app/src/org/commcare/CommCareApplication.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/org/commcare/CommCareApplication.java b/app/src/org/commcare/CommCareApplication.java index 1c91d41abd..6c4c9bfe12 100644 --- a/app/src/org/commcare/CommCareApplication.java +++ b/app/src/org/commcare/CommCareApplication.java @@ -220,8 +220,6 @@ public void onCreate() { // improperly, so the second https request in a short time period will flop) System.setProperty("http.keepAlive", "false"); - customiseOkHttp(); - Thread.setDefaultUncaughtExceptionHandler(new CommCareExceptionHandler(Thread.getDefaultUncaughtExceptionHandler(), this)); loadSqliteLibs(); @@ -537,6 +535,10 @@ public void initializeAppResources(CommCareApp app) { FirebaseAnalyticsUtil.reportCorruptAppState(); } app.setAppResourceState(resourceState); + + // This is part of the CommCare app initialization because it needs to be applied during + // app initialization, update and when switching the seated app + customiseOkHttp(); } /**