Commit 426a021c authored by Biao She's avatar Biao She Committed by Commit Bot

Fix crash due to mVrShell is not yet available


Bug: 819875
Change-Id: Ia2aa791fdc170121b3f2e7d5e43e4b79f5da33bb
Reviewed-on: https://chromium-review.googlesource.com/1003147Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Biao She <bshe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549282}
parent 08eac89f
......@@ -1696,13 +1696,6 @@ public class VrShellDelegate
});
}
if (mCancellingEntryAnimation) {
// If we know this onResume is called after cancel animation finished, it is safe to
// request exit VR and show DOFF.
runPendingExitVrTask();
mCancellingEntryAnimation = false;
}
if (mDonSucceeded || mEnterVrOnStartup) {
handleDonFlowSuccess();
} else {
......@@ -1722,6 +1715,17 @@ public class VrShellDelegate
mProbablyInDon = false;
mShowVrServicesUpdatePrompt = null;
postOnResume();
}
private void postOnResume() {
if (mCancellingEntryAnimation) {
// If we know this onResume is called after cancel animation finished, it is safe to
// request exit VR and show DOFF.
runPendingExitVrTask();
mCancellingEntryAnimation = false;
}
}
private void handleDonFlowSuccess() {
......
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