Commit dfb31870 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

Remove MonochromeApplication from Trichrome.

Remove the MonochromeApplication class from TrichromeChrome's manifest
so that the regular ChromeApplication will be used instead, to avoid
trying to set up Monochrome-specific things. Update the comment in
MonochromeApplication to make it clear that it's not used by
Trichrome and that it must only be used for things that are specific to
Monochrome being a WebView implementation.

This fixes the startup crash caused by Trichrome attempting to use
BIND_EXTERNAL_SERVICE for its child processes when the Trichrome
manifest does not declare the services as external.

Bug: 917417
Test: install and launch trichrome_chrome_apk
Change-Id: If857dfb73b75e15c73398779a159ce7bb1ad56cb
Reviewed-on: https://chromium-review.googlesource.com/c/1474997
Commit-Queue: Richard Coles <torne@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Richard Coles <torne@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632722}
parent 2f22a112
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
## Note: This is a jinja2 template, processed at build time into the final manifest. ## Note: This is a jinja2 template, processed at build time into the final manifest.
## TODO(torne): we may need a TrichromeApplication?
{% block application_name %}org.chromium.chrome.browser.MonochromeApplication{% endblock %}
{% block extra_application_attributes %} {% block extra_application_attributes %}
{{ super() }} {{ super() }}
android:multiArch="true" android:multiArch="true"
......
...@@ -16,6 +16,11 @@ import org.chromium.content_public.browser.ChildProcessCreationParams; ...@@ -16,6 +16,11 @@ import org.chromium.content_public.browser.ChildProcessCreationParams;
* You shouldn't add anything else in this file, this class is split off from * You shouldn't add anything else in this file, this class is split off from
* normal chrome in order to access Android system API through Android WebView * normal chrome in order to access Android system API through Android WebView
* glue layer and have monochrome specific code. * glue layer and have monochrome specific code.
*
* This class is NOT used by Trichrome. Do not add anything here which is only
* related to Monochrome's minimum SDK level or APK packaging decisions, because
* those are likely to apply to Trichrome as well - this must only be used for
* things specific to functioning as a WebView implementation.
*/ */
public class MonochromeApplication extends ChromeApplication { public class MonochromeApplication extends ChromeApplication {
@Override @Override
...@@ -23,7 +28,9 @@ public class MonochromeApplication extends ChromeApplication { ...@@ -23,7 +28,9 @@ public class MonochromeApplication extends ChromeApplication {
super.onCreate(); super.onCreate();
LibraryLoader.getInstance().setNativeLibraryPreloader(new MonochromeLibraryPreloader()); LibraryLoader.getInstance().setNativeLibraryPreloader(new MonochromeLibraryPreloader());
// ChildProcessCreationParams is only needed for browser process, though it is // ChildProcessCreationParams is only needed for browser process, though it is
// created and set in all processes. // created and set in all processes. We must set isExternalService to true for
// Monochrome because Monochrome's renderer services are shared with WebView
// and are external, and will fail to bind otherwise.
boolean bindToCaller = false; boolean bindToCaller = false;
boolean ignoreVisibilityForImportance = false; boolean ignoreVisibilityForImportance = false;
ChildProcessCreationParams.set(getPackageName(), true /* isExternalService */, ChildProcessCreationParams.set(getPackageName(), true /* isExternalService */,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment