GuidedStepFragment: fix temporary black screen in activity enter

Last CL deprecating background view causes the regression.

We need to keep the activity translucent during fade-in background view
of GuidedStepFragment. The trick is to actually set a transparent ColorDrawable
and make it last as long as the background view fade-in.

Change-Id: I53e63fe0cebf60028dc8f45dc3446407ad7a5ef0
diff --git a/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml b/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml
index ef14957..120f942 100644
--- a/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml
+++ b/v17/leanback/res/transition-v21/lb_guidedstep_activity_enter.xml
@@ -18,7 +18,7 @@
 <transitionSet xmlns:android="http://schemas.android.com/apk/res/android" >
   <fade
       android:interpolator="@android:interpolator/fast_out_linear_in"
-      android:duration="350">
+      android:duration="@integer/lb_guidedstep_activity_background_fade_duration_ms">
         <targets>
             <target android:targetId="@id/guidedstep_background" />
         </targets>
diff --git a/v17/leanback/res/values/integers.xml b/v17/leanback/res/values/integers.xml
index f16a7f0..c9f3384 100644
--- a/v17/leanback/res/values/integers.xml
+++ b/v17/leanback/res/values/integers.xml
@@ -34,4 +34,6 @@
     <integer name="slideEdgeStart">3</integer>
     <!-- Gravity.RIGHT -->
     <integer name="slideEdgeEnd">5</integer>
+
+    <integer name="lb_guidedstep_activity_background_fade_duration_ms">350</integer>
 </resources>
diff --git a/v17/leanback/res/values/themes.xml b/v17/leanback/res/values/themes.xml
index 056ed1f..82ee58d 100644
--- a/v17/leanback/res/values/themes.xml
+++ b/v17/leanback/res/values/themes.xml
@@ -118,8 +118,13 @@
 
         <item name="android:windowEnterTransition">@transition/lb_guidedstep_activity_enter</item>
 
+        <!-- background applied to each GuidedStepFragment by default-->
         <item name="guidedStepBackground">?android:attr/colorBackground</item>
-        <item name="android:windowBackground">@null</item>
+        <!-- Each GuidedStepFragment has a background so activity does not need a background.
+             But We still need a dumb background to keep the temporary translucent state last
+             as long as the background view fade-in transition -->
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowTransitionBackgroundFadeDuration">@integer/lb_guidedstep_activity_background_fade_duration_ms</item>
 
         <item name="guidedStepImeAppearingAnimation">@animator/lb_guidedstep_slide_up</item>
         <item name="guidedStepImeDisappearingAnimation">@animator/lb_guidedstep_slide_down</item>