Commit 74ad0db4 authored by Amirhossein Simjour's avatar Amirhossein Simjour Committed by Commit Bot

VR: fix AlertDialog showing up in 2D

VrUiWidgetFactory should be initialized with VrModalDialogManager
instead of ModalDialogManager.

The issue appeared after this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1136856

Bug: 866511
Change-Id: I0cc8fa0a0bf951415d85a44c5fe48c6fa20999a7
Reviewed-on: https://chromium-review.googlesource.com/1147214
Commit-Queue: Amirhossein Simjour <asimjour@chromium.org>
Reviewed-by: default avatarAldo Culquicondor <acondor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577501}
parent 9311d412
......@@ -164,12 +164,6 @@ public class VrShellImpl
mActivity.getFindToolbarManager().hideToolbar();
}
if (ChromeFeatureList.isEnabled(ChromeFeatureList.VR_BROWSING_NATIVE_ANDROID_UI)) {
mNonVrUiWidgetFactory = UiWidgetFactory.getInstance();
UiWidgetFactory.setInstance(
new VrUiWidgetFactory(this, mActivity.getModalDialogManager()));
}
// This overrides the default intent created by GVR to return to Chrome when the DON flow
// is triggered by resuming the GvrLayout, which is the usual way Daydream apps enter VR.
// See VrShellDelegate#getEnterVrPendingIntent for why we need to do this.
......@@ -200,6 +194,13 @@ public class VrShellImpl
if (mVrBrowsingEnabled) injectVrHostedUiView();
// This has to happen after VrModalDialogManager is created.
if (ChromeFeatureList.isEnabled(ChromeFeatureList.VR_BROWSING_NATIVE_ANDROID_UI)) {
mNonVrUiWidgetFactory = UiWidgetFactory.getInstance();
UiWidgetFactory.setInstance(
new VrUiWidgetFactory(this, mActivity.getModalDialogManager()));
}
mTabRedirectHandler = new TabRedirectHandler(mActivity) {
@Override
public boolean shouldStayInChrome(boolean hasExternalProtocol) {
......
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