Commit 1b3df93c authored by Theresa's avatar Theresa Committed by Commit Bot

Revert "Add VR workarounds for early entry"

This reverts commit ffff67f6.

Reason for revert: Suspected to be causing test failures on Nougat bot

Bug: 854327, 762724, 856373

Original change's description:
> Add VR workarounds for early entry
> 
> Adds two workarounds for Chrome being resumed or started too early when
> entering VR. These can be removed if/when the platform-side issue that
> causes these issues is fixed in VrCore.
> 
> Bug: 854327, 762724
> Change-Id: If9645c58e9d208a734582992aad5c85d378f5f40
> Reviewed-on: https://chromium-review.googlesource.com/1112761
> Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
> Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#570084}

TBR=mthiesse@chromium.org,bsheedy@chromium.org

Change-Id: I714637798cc2944a93b33240360fb27fc6dc0ee4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 854327, 762724
Reviewed-on: https://chromium-review.googlesource.com/1113846Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570231}
parent dde5013c
...@@ -47,19 +47,6 @@ public class VrMainActivity extends Activity { ...@@ -47,19 +47,6 @@ public class VrMainActivity extends Activity {
if (!VrShellDelegate.deviceSupportsVrLaunches() if (!VrShellDelegate.deviceSupportsVrLaunches()
|| (!hasDaydreamCategory && !VrShellDelegate.isInVrSession())) { || (!hasDaydreamCategory && !VrShellDelegate.isInVrSession())) {
// TODO(https://crbug.com/854327): Remove this workaround once the issue with
// launchInVr sometimes launching the given intent before entering VR is fixed.
if (IntentUtils.safeGetBooleanExtra(getIntent(),
VrIntentUtils.ENABLE_TEST_RELAUNCH_WORKAROUND_EXTRA, false)) {
Log.d(TAG,
"Relaunching given intent due to test workaround boolean being set.");
// Disable the workaround after the first time so we don't get into a loop
getIntent().putExtra(
VrIntentUtils.ENABLE_TEST_RELAUNCH_WORKAROUND_EXTRA, false);
VrIntentUtils.launchInVr(getIntent(), this);
finish();
return;
}
StringBuilder error = new StringBuilder("Attempted to launch Chrome into VR "); StringBuilder error = new StringBuilder("Attempted to launch Chrome into VR ");
if (!VrShellDelegate.deviceSupportsVrLaunches()) { if (!VrShellDelegate.deviceSupportsVrLaunches()) {
error.append("on a device that doesn't support Chrome in VR."); error.append("on a device that doesn't support Chrome in VR.");
......
...@@ -31,11 +31,6 @@ public class VrIntentUtils { ...@@ -31,11 +31,6 @@ public class VrIntentUtils {
// the relaunch logic does not work properly with the DON flow skipped. // the relaunch logic does not work properly with the DON flow skipped.
public static final String AVOID_RELAUNCH_EXTRA = public static final String AVOID_RELAUNCH_EXTRA =
"org.chromium.chrome.browser.vr_shell.AVOID_RELAUNCH"; "org.chromium.chrome.browser.vr_shell.AVOID_RELAUNCH";
// Tells Chrome to attempts a relaunch of the intent if it is received outside of VR and doesn't
// have the Daydream category set. This is a workaround for https://crbug.com/854327 where
// launchInVr can sometimes launch the given intent before entering VR.
public static final String ENABLE_TEST_RELAUNCH_WORKAROUND_EXTRA =
"org.chromium.chrome.browser.vr_shell.ENABLE_TEST_RELUANCH_WORKAROUND";
static final String VR_FRE_INTENT_EXTRA = "org.chromium.chrome.browser.vr_shell.VR_FRE"; static final String VR_FRE_INTENT_EXTRA = "org.chromium.chrome.browser.vr_shell.VR_FRE";
static final String VR_FRE_CALLER_INTENT_EXTRA = static final String VR_FRE_CALLER_INTENT_EXTRA =
......
...@@ -96,12 +96,9 @@ public class TransitionUtils { ...@@ -96,12 +96,9 @@ public class TransitionUtils {
* to errors, e.g. if there's dialog in the center of the screen blocking the canvas. * to errors, e.g. if there's dialog in the center of the screen blocking the canvas.
* *
* Only meant to be used alongside the test framework from VrTestFramework. * Only meant to be used alongside the test framework from VrTestFramework.
* @param webContents The WebContents for the tab the canvas is in. * @param cvc The ContentViewCore for the tab the canvas is in.
*/ */
public static void enterPresentation(WebContents webContents) { public static void enterPresentation(WebContents webContents) {
// TODO(https://crbug.com/762724): Remove this workaround when the issue with being resumed
// before receiving the VR broadcast is fixed on VrCore's end.
VrShellDelegateUtils.getDelegateInstance().setExpectingBroadcast();
try { try {
DOMUtils.clickNode(webContents, "webgl-canvas", false /* goThroughRootAndroidView */); DOMUtils.clickNode(webContents, "webgl-canvas", false /* goThroughRootAndroidView */);
} catch (InterruptedException | TimeoutException e) { } catch (InterruptedException | TimeoutException e) {
...@@ -211,10 +208,6 @@ public class TransitionUtils { ...@@ -211,10 +208,6 @@ public class TransitionUtils {
} }
if (avoidRelaunch) intent.putExtra(VrIntentUtils.AVOID_RELAUNCH_EXTRA, true); if (avoidRelaunch) intent.putExtra(VrIntentUtils.AVOID_RELAUNCH_EXTRA, true);
// TODO(https://crbug.com/854327): Remove this workaround once the issue with launchInVr
// sometimes launching the given intent before entering VR is fixed.
intent.putExtra(VrIntentUtils.ENABLE_TEST_RELAUNCH_WORKAROUND_EXTRA, true);
ThreadUtils.runOnUiThreadBlocking(new Runnable() { ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override @Override
public void run() { public void run() {
......
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