Import updated Android Setupdesign Library 309863724 am: d520f469f4

Change-Id: Ibe4a4ba5aaf489aaaaa71a1c138885d093ecc413
diff --git a/main/res/layout/sud_glif_illustration_loading_screen.xml b/main/res/layout/sud_glif_illustration_loading_screen.xml
new file mode 100644
index 0000000..581d5c6
--- /dev/null
+++ b/main/res/layout/sud_glif_illustration_loading_screen.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright (C) 2020 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<com.google.android.setupdesign.GlifLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/setup_wizard_layout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:ignore="UnusedResources">
+    <!-- Ignore UnusedResources: can be used by clients -->
+
+    <LinearLayout
+        android:id="@+id/default_content_container"
+        style="@style/SudContentFrame"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/sud_layout_description"
+            style="@style/SudDescription.Glif"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:visibility="invisible"/>
+
+        <com.google.android.setupdesign.view.FillContentLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+
+            <com.google.android.setupdesign.view.IllustrationVideoView
+                android:id="@+id/sud_illustration_video_view"
+                style="@style/SudContentIllustration"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+        </com.google.android.setupdesign.view.FillContentLayout>
+
+    </LinearLayout>
+
+</com.google.android.setupdesign.GlifLayout>
diff --git a/main/src/com/google/android/setupdesign/template/HeaderMixin.java b/main/src/com/google/android/setupdesign/template/HeaderMixin.java
index ef14d29..0a6eb9e 100644
--- a/main/src/com/google/android/setupdesign/template/HeaderMixin.java
+++ b/main/src/com/google/android/setupdesign/template/HeaderMixin.java
@@ -121,6 +121,14 @@
     return titleView != null ? titleView.getText() : null;
   }
 
+  /** Sets the visibility of header text */
+  public void setVisibility(int visibility) {
+    final TextView titleView = getTextView();
+    if (titleView != null) {
+      titleView.setVisibility(visibility);
+    }
+  }
+
   /**
    * Sets the color of the header text. This can also be set via XML using {@code
    * app:sucHeaderTextColor}.
diff --git a/main/src/com/google/android/setupdesign/template/IconMixin.java b/main/src/com/google/android/setupdesign/template/IconMixin.java
index f74f87a..dca934f 100644
--- a/main/src/com/google/android/setupdesign/template/IconMixin.java
+++ b/main/src/com/google/android/setupdesign/template/IconMixin.java
@@ -172,6 +172,14 @@
     return iconView != null ? iconView.getContentDescription() : null;
   }
 
+  /** Sets the visibiltiy of the icon view */
+  public void setVisibility(int visibility) {
+    final ImageView iconView = getView();
+    if (iconView != null) {
+      iconView.setVisibility(visibility);
+    }
+  }
+
   /** @return The ImageView responsible for displaying the icon. */
   protected ImageView getView() {
     return (ImageView) templateLayout.findManagedViewById(R.id.sud_layout_icon);
diff --git a/main/src/com/google/android/setupdesign/util/Partner.java b/main/src/com/google/android/setupdesign/util/Partner.java
index 6b97bf6..aee5070 100644
--- a/main/src/com/google/android/setupdesign/util/Partner.java
+++ b/main/src/com/google/android/setupdesign/util/Partner.java
@@ -27,13 +27,17 @@
 import android.os.Build.VERSION;
 import android.os.Build.VERSION_CODES;
 import androidx.annotation.AnyRes;
+import androidx.annotation.ArrayRes;
 import androidx.annotation.ColorRes;
 import androidx.annotation.DrawableRes;
 import androidx.annotation.Nullable;
 import androidx.annotation.StringRes;
 import androidx.annotation.VisibleForTesting;
 import android.util.Log;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 /**
  * Utilities to discover and interact with partner customizations. An overlay package is one that
@@ -55,10 +59,20 @@
   @Nullable private static Partner partner;
 
   /**
+   * Gets the string-array from partner overlay. If not available, an empty array will be returned.
+   *
+   * @see #getResourceEntry(Context, int)
+   */
+  public static Set<String> getStringArray(Context context, @ArrayRes int res) {
+    ResourceEntry resourceEntry = Partner.getResourceEntry(context, res);
+    return new HashSet<>(Arrays.asList(resourceEntry.resources.getStringArray(resourceEntry.id)));
+  }
+
+  /**
    * Gets a drawable from partner overlay, or if not available, the drawable from the original
    * context.
    *
-   * @see #getResourceEntry(android.content.Context, int)
+   * @see #getResourceEntry(Context, int)
    */
   public static Drawable getDrawable(Context context, @DrawableRes int id) {
     final ResourceEntry entry = getResourceEntry(context, id);
@@ -68,7 +82,7 @@
   /**
    * Gets a string from partner overlay, or if not available, the string from the original context.
    *
-   * @see #getResourceEntry(android.content.Context, int)
+   * @see #getResourceEntry(Context, int)
    */
   public static String getString(Context context, @StringRes int id) {
     final ResourceEntry entry = getResourceEntry(context, id);
diff --git a/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java b/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java
index 939b8de..0654b02 100644
--- a/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java
+++ b/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java
@@ -188,7 +188,7 @@
       mediaPlayer.setDataSource(getContext(), uri, null);
       mediaPlayer.prepareAsync();
     } catch (IOException e) {
-      Log.wtf(TAG, "Unable to set data source", e);
+      Log.e(TAG, "Unable to set video data source: " + videoRes, e);
     }
   }
 
@@ -350,7 +350,7 @@
     if (isPrepared()) {
       mp.start();
     } else {
-      Log.wtf(TAG, "Seek complete but media player not prepared");
+      Log.e(TAG, "Seek complete but media player not prepared");
     }
   }