Bug 1453143 - [2.0] Use GeckoRuntimeSettings builder in the example app. r=rbarker
authorEugen Sawin <esawin@mozilla.com>
Tue, 10 Apr 2018 23:19:56 +0200
changeset 413313 4d56446fd614f8b4e2beb8466bfe1a13b170bd81
parent 413312 5d38501e55dc2172f489b5a394c623c2e6431cee
child 413314 a3b3732bb802af9d1364dcd5d8b901cc3a24ef0f
push id33843
push usernerli@mozilla.com
push dateSat, 14 Apr 2018 09:49:25 +0000
treeherdermozilla-central@37b8862d354e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrbarker
bugs1453143
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1453143 - [2.0] Use GeckoRuntimeSettings builder in the example app. r=rbarker
mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
--- a/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
+++ b/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
@@ -49,27 +49,28 @@ public class GeckoViewActivity extends A
 
         setContentView(R.layout.geckoview_activity);
         mGeckoView = (GeckoView) findViewById(R.id.gecko_view);
 
         final boolean useMultiprocess =
             getIntent().getBooleanExtra(USE_MULTIPROCESS_EXTRA, true);
 
         if (sGeckoRuntime == null) {
-            final GeckoRuntimeSettings geckoSettings = new GeckoRuntimeSettings();
+            final GeckoRuntimeSettings.Builder runtimeSettingsBuilder =
+                new GeckoRuntimeSettings.Builder();
 
             if (BuildConfig.DEBUG) {
                 // In debug builds, we want to load JavaScript resources fresh with
                 // each build.
-                geckoSettings.setArguments(new String[] { "-purgecaches" });
+                runtimeSettingsBuilder.arguments(new String[] { "-purgecaches" });
             }
 
-            geckoSettings.setUseContentProcessHint(useMultiprocess);
-            geckoSettings.setExtras(getIntent().getExtras());
-            sGeckoRuntime = GeckoRuntime.create(this, geckoSettings);
+            runtimeSettingsBuilder.useContentProcessHint(useMultiprocess)
+                                  .extras(getIntent().getExtras());
+            sGeckoRuntime = GeckoRuntime.create(this, runtimeSettingsBuilder.build());
         }
 
         final GeckoSessionSettings sessionSettings = new GeckoSessionSettings();
         sessionSettings.setBoolean(GeckoSessionSettings.USE_MULTIPROCESS,
                                    useMultiprocess);
         mGeckoSession = new GeckoSession(sessionSettings);
 
         mGeckoView.setSession(mGeckoSession, sGeckoRuntime);