Commit 907652b8 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

VR: Hide 2D screenshot when resuming activities in VR and hide 2D UI while loading VR UI.

This CL adds an animation that keeps the resuming Activity hidden for 500ms while 
starting up to allow time for us to draw the black overlay, also added in this CL,
and prevent 2D UI from being shown while entering VR.

This also performs some cleanup around VR entry (now that it's even more async than
before) to ensure that we don't continue trying to enter VR after we try to exit
VR (like when the activity is paused, etc.).

Bug: 728148
Change-Id: I344ad661b632bde74764b134e9d9f70f6258d68d
Reviewed-on: https://chromium-review.googlesource.com/519483Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarYash Malik <ymalik@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476301}
parent f770fd9f
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!-- The delay here must be long enough for the Activity being resumed to draw
its first frame of UI. This is to avoid showing stale 2D screenshots when
launching Chrome in VR. Note that the larger this value is, the more
latency we add to resuming Chrome after going through the Daydream Device
ON flow. -->
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator"
android:fromAlpha="0" android:toAlpha="0"
android:duration="500" />
...@@ -730,4 +730,10 @@ ...@@ -730,4 +730,10 @@
<item name="android:windowEnterAnimation">@anim/design_bottom_sheet_slide_in</item> <item name="android:windowEnterAnimation">@anim/design_bottom_sheet_slide_in</item>
<item name="android:windowExitAnimation">@null</item> <item name="android:windowExitAnimation">@null</item>
</style> </style>
<!-- VR animations -->
<style name="VrEntryAnimation">
<item name="android:windowEnterAnimation">@anim/stay_hidden</item>
<item name="android:windowExitAnimation">@null</item>
</style>
</resources> </resources>
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