Commit 322a0c7a authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

[WebLayer] Return correct LayoutInflater in SiteSettingsFragmentImpl

This CL fixes the remaining major known Site Settings issues. This
makes the fake settings Activity return the correct LayoutInflater,
which fixes two dialogs that used to crash when opening, and fixes
several theming issues such as incorrect colors or missing checkboxes
or radio controls.

Bug: 1049683
Change-Id: I4d8ab780eac74f3108361a1168e5e41b46935787
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207814
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771105}
parent 9a87d411
...@@ -82,9 +82,18 @@ public class SiteSettingsFragmentImpl extends RemoteFragmentImpl { ...@@ -82,9 +82,18 @@ public class SiteSettingsFragmentImpl extends RemoteFragmentImpl {
@Override @Override
public Object getSystemService(String name) { public Object getSystemService(String name) {
if (Context.LAYOUT_INFLATER_SERVICE.equals(name)) {
return getLayoutInflater();
}
return getEmbedderActivity().getSystemService(name); return getEmbedderActivity().getSystemService(name);
} }
@Override
public LayoutInflater getLayoutInflater() {
return (LayoutInflater) getBaseContext().getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
}
@Override @Override
public Window getWindow() { public Window getWindow() {
return getEmbedderActivity().getWindow(); return getEmbedderActivity().getWindow();
......
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