From 65bab54631497abc260b3f01c8eab43b88a04c40 Mon Sep 17 00:00:00 2001 From: Butkovits Atila Date: Wed, 21 Jul 2021 23:54:19 +0300 Subject: [PATCH] Backed out changeset 9d2cc3a9622d (bug 1721631) for causing geckoview failures. CLOSED TREE --- .../java/org/mozilla/geckoview/GeckoRuntime.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java index 784b53848ef3..f084b522ad53 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java @@ -30,6 +30,7 @@ import androidx.annotation.AnyThread; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; +import androidx.collection.ArrayMap; import android.util.Log; import org.mozilla.gecko.EventDispatcher; @@ -49,6 +50,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.List; +import java.util.Map; public final class GeckoRuntime implements Parcelable { private static final String LOGTAG = "GeckoRuntime"; @@ -357,6 +359,18 @@ public final class GeckoRuntime implements Parcelable { info.extras = settings.getExtras(); info.flags = flags; + // Bug 1605454: Temporary change for Fenix experiment that disables webrender + // Once the experiment ends or experimenter gets implemented in Gecko, this should be removed + // and replaced by : + // info.prefs = settings.getPrefsMap(); + final Map prefMap = new ArrayMap(); + prefMap.putAll(settings.getPrefsMap()); + if (info.extras.getInt("forcedisablewebrender") == 1) { + prefMap.put("gfx.webrender.force-disabled", true); + } + info.prefs = prefMap; + // End of Bug 1605454 hack + // Older versions have problems with SnakeYaml if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { String configFilePath = settings.getConfigFilePath();