[DO NOT MERGE ANYWHERE] TvSetupCustomization apps

This CL is for TV GMS and TV reference designs only.

Added 2 customization and validation apps. Partners can use these to
validate the TV Setup partner customization interface.

It also removes the existing SetupCustomizer, which is out-of-date.

Bug: 78910364
Test: manual

Change-Id: Icb940b38ae1e7677d83f90d1589638f1e4de1a5f
diff --git a/apps/SetupCustomizer/Android.mk b/apps/SetupCustomizer/Android.mk
deleted file mode 100644
index 9312a36..0000000
--- a/apps/SetupCustomizer/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_PATH := $(PRODUCT_OUT)/system/priv-app
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := TvSetupCustomizer
-
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
diff --git a/apps/SetupCustomizer/AndroidManifest.xml b/apps/SetupCustomizer/AndroidManifest.xml
deleted file mode 100644
index bdd31ff..0000000
--- a/apps/SetupCustomizer/AndroidManifest.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.google.android.tvsetup.partnercustomizer">
-
-    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
-    <uses-permission android:name="android.permission.INTERNET" />
-
-    <application android:label="@string/app_label">
-
-        <receiver android:name=".PartnerReceiver">
-            <intent-filter>
-                <action android:name="com.google.android.tvsetup.action.PARTNER_CUSTOMIZATION" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-
-            <intent-filter>
-                <action android:name="android.intent.action.PACKAGE_ADDED" />
-                <action android:name="android.intent.action.PACKAGE_REMOVED" />
-                <data android:scheme="package"/>
-            </intent-filter>
-        </receiver>
-    </application>
-</manifest>
diff --git a/apps/SetupCustomizer/proguard-project.txt b/apps/SetupCustomizer/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/apps/SetupCustomizer/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/apps/SetupCustomizer/res/drawable-xhdpi/welcome_background.png b/apps/SetupCustomizer/res/drawable-xhdpi/welcome_background.png
deleted file mode 100644
index 2f2533a..0000000
--- a/apps/SetupCustomizer/res/drawable-xhdpi/welcome_background.png
+++ /dev/null
Binary files differ
diff --git a/apps/SetupCustomizer/res/values-de/strings.xml b/apps/SetupCustomizer/res/values-de/strings.xml
deleted file mode 100644
index 2794b47..0000000
--- a/apps/SetupCustomizer/res/values-de/strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<resources>
-    <!-- Welcome message -->
-    <string name="welcome_message">a really really long welcome message, because german</string>
-</resources>
diff --git a/apps/SetupCustomizer/res/values-en-rCA/strings.xml b/apps/SetupCustomizer/res/values-en-rCA/strings.xml
deleted file mode 100644
index 2b19782..0000000
--- a/apps/SetupCustomizer/res/values-en-rCA/strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<resources>
-    <!-- Welcome message -->
-    <string name="welcome_message">welcome_message, eh?</string>
-</resources>
diff --git a/apps/SetupCustomizer/res/values/bools.xml b/apps/SetupCustomizer/res/values/bools.xml
deleted file mode 100644
index 4e19b14..0000000
--- a/apps/SetupCustomizer/res/values/bools.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright 2012-2014 Google Inc. All Rights Reserved. -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <!-- Display "SKIP" in network selection screen -->
-    <bool name="show_skip_network">true</bool>
-
-    <!-- Allow user to skip Google signin at signin setup step -->
-    <bool name="show_skip_signin">true</bool>
-
-    <!-- Show wifi WPS option at top of list -->
-    <bool name="show_wps_at_top">true</bool>
-
-    <!-- Prevent users from returning to the pre-setup oem customization hook -->
-    <bool name="prevent_prehook_replay">true</bool>
-</resources>
diff --git a/apps/SetupCustomizer/res/values/dimens.xml b/apps/SetupCustomizer/res/values/dimens.xml
deleted file mode 100644
index 6907661..0000000
--- a/apps/SetupCustomizer/res/values/dimens.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright 2012-2014 Google Inc. All Rights Reserved. -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <!-- Max width for welcome text (default: 536dp) -->
-    <dimen name="welcome_message_max_width">400dp</dimen>
-
-    <!-- Offset (positive or negative) for the welcome message (default: 0) -->
-    <dimen name="welcome_message_offset">-100dp</dimen>
-
-</resources>
diff --git a/apps/SetupCustomizer/res/values/strings.xml b/apps/SetupCustomizer/res/values/strings.xml
deleted file mode 100644
index f53fb11..0000000
--- a/apps/SetupCustomizer/res/values/strings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<resources>
-
-    <string name="app_label">SetupCustomizer</string>
-
-    <!-- Welcome message -->
-    <string name="welcome_message">welcome_message</string>
-
-    <!-- Custom wallpaper [DO NOT TRANSLATE] -->
-    <string name="setup_wallpaper_component" translatable="false">com.android.systemui/com.android.systemui.ImageWallpaper</string>
-
-</resources>
diff --git a/apps/SetupCustomizer/src/com/android/tvsetup/partnercustomizer/PartnerReceiver.java b/apps/SetupCustomizer/src/com/android/tvsetup/partnercustomizer/PartnerReceiver.java
deleted file mode 100644
index cf8efd9..0000000
--- a/apps/SetupCustomizer/src/com/android/tvsetup/partnercustomizer/PartnerReceiver.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2014 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.
- */
-
-package com.google.android.tvsetup.partnercustomizer;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-/**
- * This class allows the system/setup app to find the partner customization package.
- *
- * Package must be a system app to be used for partner customization.
- */
-public class PartnerReceiver extends BroadcastReceiver {
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-    }
-}
diff --git a/apps/TvSetupCustomizationSample/.gitignore b/apps/TvSetupCustomizationSample/.gitignore
new file mode 100644
index 0000000..09b993d
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/.gitignore
@@ -0,0 +1,8 @@
+*.iml
+.gradle
+/local.properties
+/.idea
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/apps/TvSetupCustomizationSample/app/.gitignore b/apps/TvSetupCustomizationSample/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/apps/TvSetupCustomizationSample/app/build.gradle b/apps/TvSetupCustomizationSample/app/build.gradle
new file mode 100644
index 0000000..f4df956
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 26
+    defaultConfig {
+        applicationId "com.google.android.tv.setup.customizationsample"
+        minSdkVersion 21
+        targetSdkVersion 26
+        versionCode 1
+        versionName "1.0"
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+    lintOptions {
+        abortOnError false
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation 'com.android.support:leanback-v17:26.1.0'
+    implementation 'com.android.support:appcompat-v7:26.1.0'
+}
diff --git a/apps/TvSetupCustomizationSample/app/proguard-rules.pro b/apps/TvSetupCustomizationSample/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/apps/TvSetupCustomizationSample/app/src/main/AndroidManifest.xml b/apps/TvSetupCustomizationSample/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..da0ef2b
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/AndroidManifest.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.google.android.tv.setup.customizationsample">
+
+    <uses-feature
+        android:name="android.hardware.touchscreen"
+        android:required="false" />
+    <uses-feature
+        android:name="android.software.leanback"
+        android:required="true" />
+
+    <uses-permission android:name="com.android.setupwizard.permission.SETUP" />
+    <uses-permission android:name="android.permission.REBOOT" />
+
+    <application
+        android:label="TV Setup Customization Sample"
+        android:theme="@style/AppTheme">
+
+
+        <!-- This Receiver marks this app as being eligible to provide resources which influence
+        the behavior and look of TV Setup. -->
+        <receiver android:name=".PartnerReceiver">
+            <intent-filter>
+                <action android:name="com.google.android.tvsetup.action.PARTNER_CUSTOMIZATION" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </receiver>
+
+
+        <!-- Pre-Core and Post-Core Activities -->
+
+        <activity
+            android:name=".PreCoreActivity"
+            android:label="Partner Hook: PreCore (Priority 5)"
+            android:screenOrientation="landscape">
+            <intent-filter android:priority="5">
+                <action android:name="com.android.setupwizard.action.PRE_CORE_SETUP" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name=".PreCore2Activity"
+            android:label="Partner Hook: PreCore (Priority 4)"
+            android:screenOrientation="landscape">
+            <intent-filter android:priority="4">
+                <action android:name="com.android.setupwizard.action.PRE_CORE_SETUP" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+        <activity
+            android:name=".PreCorePpuActivity"
+            android:label="Partner Hook: PreCore PostProvisionedUpgrade"
+            android:screenOrientation="landscape">
+            <intent-filter android:priority="2">
+                <action android:name="com.android.setupwizard.action.POST_UPGRADE_PRE_CORE_SETUP" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+        <activity
+            android:name=".PostCoreActivity"
+            android:screenOrientation="landscape"
+            android:label="Partner Hook: PostCore"
+            >
+            <intent-filter>
+                <action android:name="com.android.setupwizard.action.POST_CORE_SETUP" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+        <activity
+            android:name=".PostCorePpuActivity"
+            android:screenOrientation="landscape"
+            android:label="Partner Hook: PostCore PostProvisionedUpgrade"
+            >
+            <intent-filter>
+                <action android:name="com.android.setupwizard.action.POST_UPGRADE_POST_CORE_SETUP" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+
+        <!-- System Upgrade Activities -->
+
+        <activity
+            android:name=".UpgradeCheckActivity"
+            android:screenOrientation="landscape"
+            android:label="Partner Hook: System Upgrade Check"
+            >
+            <intent-filter>
+                <action android:name="com.android.setupwizard.action.OEM_OTA_CHECK_SETUP" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+        <activity
+            android:name=".UpgradePerformActivity"
+            android:screenOrientation="landscape"
+            android:label="Partner Hook: System Upgrade Perform"
+            android:exported="true"
+            >
+        </activity>
+
+    </application>
+
+</manifest>
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/BaseActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/BaseActivity.java
new file mode 100644
index 0000000..929d913
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/BaseActivity.java
@@ -0,0 +1,45 @@
+package com.google.android.tv.setup.customizationsample;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public abstract class BaseActivity extends Activity {
+
+    protected ImageView iv0;
+    protected Button btn0;
+    protected TextView tv0;
+    protected TextView tv1;
+    protected TextView tv2;
+    protected TextView tv3;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_base_layout);
+
+        iv0 = (ImageView)findViewById(R.id.image0);
+        btn0 = (Button)findViewById(R.id.btn0);
+        tv0 = (TextView)findViewById(R.id.tv0);
+        tv1 = (TextView)findViewById(R.id.tv1);
+        tv2 = (TextView)findViewById(R.id.tv2);
+        tv3 = (TextView)findViewById(R.id.tv3);
+
+        tv0.setText(getTitle());
+
+        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
+        Date now = new Date();
+        String strDate = sdf.format(now);
+        tv1.setText(strDate);
+    }
+
+    protected void log(String message) {
+        Log.d(getPackageName(), message);
+    }
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/HookActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/HookActivity.java
new file mode 100644
index 0000000..05a387f
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/HookActivity.java
@@ -0,0 +1,29 @@
+package com.google.android.tv.setup.customizationsample;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+
+public class HookActivity extends BaseActivity {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        iv0.setVisibility(View.VISIBLE);
+        iv0.setImageResource(R.drawable.hook);
+
+        btn0.setVisibility(View.VISIBLE);
+        btn0.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                onAboutToFinish();
+                finish();
+            }
+        });
+    }
+
+    protected void onAboutToFinish() {
+        setResult(Activity.RESULT_OK);
+    }
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PartnerReceiver.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PartnerReceiver.java
new file mode 100644
index 0000000..340d270
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PartnerReceiver.java
@@ -0,0 +1,17 @@
+package com.google.android.tv.setup.customizationsample;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+/**
+ * This no-op BroadcastReceiver marks this application as a provider of partner resources for
+ * Android TV Setup. See AndroidManifest.xml for more details.
+ */
+public class PartnerReceiver extends BroadcastReceiver {
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        // Do nothing.
+    }
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PostCoreActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PostCoreActivity.java
new file mode 100644
index 0000000..2487d3d
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PostCoreActivity.java
@@ -0,0 +1,7 @@
+package com.google.android.tv.setup.customizationsample;
+
+/**
+ * A POST_CORE_SETUP Activity.
+ */
+public class PostCoreActivity extends HookActivity {
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PostCorePpuActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PostCorePpuActivity.java
new file mode 100644
index 0000000..7bab4d2
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PostCorePpuActivity.java
@@ -0,0 +1,7 @@
+package com.google.android.tv.setup.customizationsample;
+
+/**
+ * A POST_UPGRADE_POST_CORE_SETUP Activity.
+ */
+public class PostCorePpuActivity extends HookActivity {
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCore2Activity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCore2Activity.java
new file mode 100644
index 0000000..cc6d9c1
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCore2Activity.java
@@ -0,0 +1,40 @@
+package com.google.android.tv.setup.customizationsample;
+
+import android.content.Intent;
+
+/**
+ * A PRE_CORE_SETUP Activity.
+ */
+public class PreCore2Activity extends HookActivity {
+
+    private static final String EXTRA_OEM_NETWORK_SETUP = "OEM_NETWORK_SETUP";
+    private static final String EXTRA_OEM_NETWORK_SETUP_SKIPPED = "OEM_NETWORK_SETUP_SKIPPED";
+
+    @Override
+    protected void onAboutToFinish() {
+        Intent intent = new Intent();
+
+        // Set this to true to inform TV Setup that the partner has handled the network setup.
+        // A present and true value means that TV Setup will not show the default Network step
+        // (because the partner has already handled it and it would be weird for the user to see
+        // the default Network step after already having gone through the partner's.
+        if (getIntent().getBooleanExtra(EXTRA_OEM_NETWORK_SETUP, false)) {
+            // We read the extra from the incoming Intent only for testing purposes. Normally, this
+            // partner Activity would have its own reasons for returning this extra back to Setup.
+            intent.putExtra(EXTRA_OEM_NETWORK_SETUP, true);
+        }
+
+        // Set this to true to inform TV Setup that the partner has handled the network setup and
+        // that the user chose to skip setting up a network connection.
+        // A present and true value means that TV Setup will not show steps that require a network
+        // connection.
+
+        if (getIntent().getBooleanExtra(EXTRA_OEM_NETWORK_SETUP_SKIPPED, false)) {
+            // We read the extra from the incoming Intent only for testing purposes. Normally, this
+            // partner Activity would have its own reasons for returning this extra back to Setup.
+            intent.putExtra(EXTRA_OEM_NETWORK_SETUP_SKIPPED, true);
+        }
+
+        setResult(RESULT_OK, intent);
+    }
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCoreActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCoreActivity.java
new file mode 100644
index 0000000..1e9f987
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCoreActivity.java
@@ -0,0 +1,7 @@
+package com.google.android.tv.setup.customizationsample;
+
+/**
+ * A PRE_CORE_SETUP Activity.
+ */
+public class PreCoreActivity extends HookActivity {
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCorePpuActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCorePpuActivity.java
new file mode 100644
index 0000000..2068505
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/PreCorePpuActivity.java
@@ -0,0 +1,7 @@
+package com.google.android.tv.setup.customizationsample;
+
+/**
+ * A POST_UPGRADE_PRE_CORE_SETUP Activity.
+ */
+public class PreCorePpuActivity extends HookActivity {
+}
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/UpgradeCheckActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/UpgradeCheckActivity.java
new file mode 100644
index 0000000..3d744c5
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/UpgradeCheckActivity.java
@@ -0,0 +1,51 @@
+package com.google.android.tv.setup.customizationsample;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+
+/**
+ * A OEM_OTA_CHECK_SETUP Activity, which simulates checking for a system upgrade.
+ */
+public class UpgradeCheckActivity extends BaseActivity {
+
+    int mSecondsRemaining;
+    Runnable mRunnable;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Here we pretend that we are checking if an upgrade is available.
+        // We do not make visible any UI elements; instead we allow Android TV Setup's "Please wait"
+        // step to show under us while we figure out if an upgrade is available. That way there are
+        // fewer transitions which is especially useful in case we have nothing important to do.
+        mRunnable = new Runnable() {
+            @Override
+            public void run() {
+                mSecondsRemaining--;
+                if (mSecondsRemaining >= 0) {
+                    tv3.setText(mSecondsRemaining + " seconds remaining");
+                    new Handler().postDelayed(mRunnable, 1000);
+                } else {
+                    // This skip_stage_2 stuff is just for testing - so that we can exercise the
+                    // case where no follow-up Activity is needed.
+                    if (getIntent().getBooleanExtra("skip_follow_up", false)) {
+                        log("hook post-network: return no follow-up Activity Intent");
+                        setResult(RESULT_OK);
+                        finish();
+                    } else {
+                        log("hook post-network: return follow-up Activity Intent");
+                        Intent intent = new Intent(getApplicationContext(), UpgradePerformActivity.class);
+                        setResult(RESULT_OK, intent);
+                        finish();
+                    }
+                }
+            }
+        };
+        mSecondsRemaining = 3;
+        mRunnable.run();
+    }
+}
+
+
diff --git a/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/UpgradePerformActivity.java b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/UpgradePerformActivity.java
new file mode 100644
index 0000000..0058dfe
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/java/com/google/android/tv/setup/customizationsample/UpgradePerformActivity.java
@@ -0,0 +1,53 @@
+package com.google.android.tv.setup.customizationsample;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.PowerManager;
+import android.view.View;
+
+/**
+ * A OEM_OTA_CHECK_SETUP follow-up Activity, which simulates performing a system upgrade.
+ */
+public class UpgradePerformActivity extends BaseActivity {
+
+    int mSecondsRemaining;
+    Runnable mRunnable;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Here we pretend to perform a system upgrade.
+        iv0.setVisibility(View.VISIBLE);
+        iv0.setImageResource(R.drawable.download);
+        mRunnable = new Runnable() {
+            @Override
+            public void run() {
+                mSecondsRemaining--;
+                if (mSecondsRemaining >= 0) {
+                    tv3.setText(mSecondsRemaining + " seconds remaining");
+                    new Handler().postDelayed(mRunnable, 1000);
+                } else {
+                    conclude();
+                }
+            }
+        };
+        mSecondsRemaining = 3;
+        mRunnable.run();
+    }
+
+    protected void conclude() {
+        if (getIntent().getBooleanExtra("reboot", false)) {
+            log("simulate perform upgrade: simulate upgrade by invoking reboot now");
+            PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
+            pm.reboot(null);
+        } else {
+            log("simulate perform upgrade: simulate upgrade halted/failed; return to Setup");
+            setResult(RESULT_OK);
+            finish();
+        }
+    }
+}
+
+
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/download.png b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/download.png
new file mode 100644
index 0000000..ab2a1ea
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/download.png
Binary files differ
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/hook.png b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/hook.png
new file mode 100644
index 0000000..f7c7add
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/hook.png
Binary files differ
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/hotword_graphic.png b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/hotword_graphic.png
new file mode 100644
index 0000000..6e1513b
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/hotword_graphic.png
Binary files differ
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/welcome_background.png b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/welcome_background.png
new file mode 100644
index 0000000..7dd9c92
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-xhdpi/welcome_background.png
Binary files differ
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/drawable-zh-xhdpi/hotword_graphic.png b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-zh-xhdpi/hotword_graphic.png
new file mode 100644
index 0000000..a12e02b
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/drawable-zh-xhdpi/hotword_graphic.png
Binary files differ
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/layout/activity_base_layout.xml b/apps/TvSetupCustomizationSample/app/src/main/res/layout/activity_base_layout.xml
new file mode 100644
index 0000000..da44ab4
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/layout/activity_base_layout.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:tools="http://schemas.android.com/tools">
+
+    <ImageView
+        android:id="@+id/image0"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal|top"
+        android:layout_marginTop="60dp"
+        android:visibility="gone"
+        />
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_gravity="left|bottom"
+        >
+
+        <Button
+            android:id="@+id/btn0"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="Next"
+            android:visibility="gone"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            />
+
+        <TextView
+            android:id="@+id/tv0"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="24sp" />
+
+        <TextView
+            android:id="@+id/tv1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="12sp" />
+
+        <TextView
+            android:id="@+id/tv2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="12sp" />
+
+        <TextView
+            android:id="@+id/tv3"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="left|bottom"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginBottom="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="12sp" />
+
+    </LinearLayout>
+
+</FrameLayout>
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/values-zh/config.xml b/apps/TvSetupCustomizationSample/app/src/main/res/values-zh/config.xml
new file mode 100644
index 0000000..8d0b323
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/values-zh/config.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <!--<string name="welcome_message">你好</string>-->
+
+    <!--<string name="hotword_description_appendage">Hotwording 很熱!</string>-->
+
+
+</resources>
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/values/config.xml b/apps/TvSetupCustomizationSample/app/src/main/res/values/config.xml
new file mode 100644
index 0000000..34b2fec
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/values/config.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+
+    <!-- Whether to allow backing into the pre-hook activities. -->
+    <!--<bool name="prevent_prehook_replay"></bool>-->
+
+
+    <!-- Set the system locale just after Setup starts. If present, the default locale picker will
+         not be shown. This interface is flawed and is removed in later versions of the TV Setup
+         Partner Interface. We recommend not using this; instead set ro.product.locale.XXX
+         properties in /system/build.prop.
+         -->
+    <!--<string name="system_locale"></string>-->
+
+
+    <!-- Whether to show the your-device-has-been-upgraded step in the case of a post-provisioned-upgrade run. -->
+    <!--<bool name="show_post_upgrade_welcome"></bool>-->
+
+
+    <!-- Provide a list of locales to show atop the default locale picker.
+         Relevant only if the default locale picker is shown. -->
+    <!--<string-array name="preferred_locales"><item></item></string-array>-->
+
+
+    <!-- Provide a welcome string to display on the default locale picker.
+         Relevant only if the default locale picker is shown. -->
+    <!--<string name="welcome_message"></string>-->
+
+
+    <!-- Provide the android:maxWidth attribute for the welcome string on the default locale picker.
+         Relevant only if the default locale picker is shown. -->
+    <!--<dimen name="welcome_message_max_width"></dimen>-->
+
+
+    <!-- Provide the y offset for the welcome string on the default locale picker. A negative value
+         means lift the View upward; a positive value means push it downward.
+         Relevant only if the default locale picker is shown. -->
+    <!--<dimen name="welcome_message_offset"></dimen>-->
+
+
+    <!-- Whether WPS option should be shown at the top of the default Wi-Fi selection step. By
+         default, the WPS option is placed at the bottom. -->
+    <!--<bool name="show_wps_at_top"></bool>-->
+
+
+    <!-- Whether to present the device-to-device bootstrap (QuickSetup) flow. -->
+    <!--<bool name="enable_d2d_bootstrap"></bool>-->
+
+
+    <!-- Provide the package name of the partner's phone-side companion app, which will be
+         advertised on the phone-side if the user completes QuickSetup.
+         Relevant only if QuickSetup is enabled and is completed successfully. -->
+    <!--<string name="d2d_bootstrap_companion_app"></string>-->
+
+
+    <!-- Provide a title for the screen advertising the phone-side companion app, which will be
+         shown on the phone-side if the user completes QuickSetup.
+         Relevant only if QuickSetup is enabled and is completed successfully. -->
+    <!--<string name="d2d_bootstrap_app_install_title"></string>-->
+
+
+    <!-- Provide a message for the screen advertising the phone-side companion app, which will be
+         shown on the phone-side if the user completes QuickSetup.
+         Relevant only if QuickSetup is enabled and is completed successfully. -->
+    <!--<string name="d2d_bootstrap_app_install_message"></string>-->
+
+
+    <!-- Whether to allow the user to skip the default Network step. -->
+    <!--<bool name="show_skip_network"></bool>-->
+
+
+    <!-- Whether to allow the user to skip the Google Account Sign-in step. -->
+    <!--<bool name="show_skip_signin"></bool>-->
+
+
+    <!-- Whether to show the set-device-name step. -->
+    <!--<bool name="show_set_device_name"></bool>-->
+
+
+    <!-- Whether to show the assistant hotword step during Setup.
+         This is only relevant if the device supports hotwording. -->
+    <!--<bool name="show_assistant_hotword"></bool>-->
+
+
+    <!-- Provide a partner-specific string for the hotword step.
+         This is only relevant if the hotwording step gets shown. -->
+    <!--<string name="hotword_description_appendage"></string>-->
+
+
+    <!-- Whether the tutorials step should be shown in the case of a post-provisioned-upgrade run. -->
+    <!--<bool name="show_tutorial_post_provisioned_upgrade"></bool>-->
+
+
+</resources>
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/values/strings.xml b/apps/TvSetupCustomizationSample/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..25fe7ea
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+<resources>
+
+
+</resources>
diff --git a/apps/TvSetupCustomizationSample/app/src/main/res/values/styles.xml b/apps/TvSetupCustomizationSample/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..178c902
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/app/src/main/res/values/styles.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <style name="AppTheme" parent="@style/Theme.Leanback">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowShowWallpaper">false</item>
+    </style>
+    
+    <style name="AppThemeOpaque" parent="@style/Theme.Leanback">
+        <item name="android:windowBackground">@android:color/holo_blue_light</item>
+    </style>
+
+</resources>
diff --git a/apps/TvSetupCustomizationSample/build.gradle b/apps/TvSetupCustomizationSample/build.gradle
new file mode 100644
index 0000000..e6b32bc
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    
+    repositories {
+        google()
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.0.1'
+        
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}
diff --git a/apps/TvSetupCustomizationSample/gradle.properties b/apps/TvSetupCustomizationSample/gradle.properties
new file mode 100644
index 0000000..aac7c9b
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/gradle.properties
@@ -0,0 +1,17 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
diff --git a/apps/TvSetupCustomizationSample/gradle/wrapper/gradle-wrapper.jar b/apps/TvSetupCustomizationSample/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/apps/TvSetupCustomizationSample/gradle/wrapper/gradle-wrapper.properties b/apps/TvSetupCustomizationSample/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e03ba59
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed May 09 12:57:15 PDT 2018
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
diff --git a/apps/TvSetupCustomizationSample/gradlew b/apps/TvSetupCustomizationSample/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/apps/TvSetupCustomizationSample/settings.gradle b/apps/TvSetupCustomizationSample/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/apps/TvSetupCustomizationSample/settings.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/apps/TvSetupValidation/.gitignore b/apps/TvSetupValidation/.gitignore
new file mode 100644
index 0000000..09b993d
--- /dev/null
+++ b/apps/TvSetupValidation/.gitignore
@@ -0,0 +1,8 @@
+*.iml
+.gradle
+/local.properties
+/.idea
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/apps/TvSetupValidation/app/.gitignore b/apps/TvSetupValidation/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/apps/TvSetupValidation/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/apps/TvSetupValidation/app/build.gradle b/apps/TvSetupValidation/app/build.gradle
new file mode 100644
index 0000000..05f841e
--- /dev/null
+++ b/apps/TvSetupValidation/app/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 26
+    defaultConfig {
+        applicationId "com.google.android.tv.setup.validation"
+        minSdkVersion 21
+        targetSdkVersion 26
+        versionCode 1
+        versionName "1.0"
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+    lintOptions {
+        abortOnError false
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation 'com.android.support:leanback-v17:26.1.0'
+    implementation 'com.android.support:appcompat-v7:26.1.0'
+}
diff --git a/apps/TvSetupValidation/app/proguard-rules.pro b/apps/TvSetupValidation/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/apps/TvSetupValidation/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/apps/TvSetupValidation/app/src/main/AndroidManifest.xml b/apps/TvSetupValidation/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..d7313c0
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/AndroidManifest.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.google.android.tv.setup.validation">
+
+    <uses-feature
+        android:name="android.hardware.touchscreen"
+        android:required="false" />
+    <uses-feature
+        android:name="android.software.leanback"
+        android:required="true" />
+
+    <application
+        android:label="TV Setup Validation"
+        android:theme="@style/AppTheme">
+
+
+        <!-- A simple opaque Activity with a button that finishes it. -->
+        <activity
+            android:name=".OpaqueActivity"
+            android:screenOrientation="landscape"
+            android:label="Opaque Activity"
+            android:exported="true"
+            android:theme="@style/AppThemeOpaque"
+            >
+        </activity>
+
+        <!-- A simple transparent Activity with a button that finishes it. -->
+        <activity
+            android:name=".TransparentActivity"
+            android:screenOrientation="landscape"
+            android:label="Transparent Activity"
+            android:exported="true"
+            >
+        </activity>
+
+
+        <!-- Implements a pre-Enrollment action (which is normally handled by Katniss). We say
+        'pre-Enrollment' because the actual enrollment Activity is a device-specific Activity; the
+        design calls for the Katniss implementation of this action to redirect to that device-
+        specific Activity (which we do not attempt here with MockHotwordEnrollmentActivity)-->
+        <activity
+            android:name=".MockHotwordEnrollmentActivity"
+            android:screenOrientation="landscape"
+            android:label="Mock Hotword Enrollment"
+            >
+            <intent-filter>
+                <action android:name="com.google.android.katniss.action.ATV_SETUP_ENROLL_HOTWORD" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+
+    </application>
+
+</manifest>
diff --git a/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/BaseActivity.java b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/BaseActivity.java
new file mode 100644
index 0000000..60e16ec
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/BaseActivity.java
@@ -0,0 +1,47 @@
+package com.google.android.tv.setup;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.google.android.tv.setup.validation.R;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public abstract class BaseActivity extends Activity {
+
+    protected ImageView iv0;
+    protected Button btn0;
+    protected TextView tv0;
+    protected TextView tv1;
+    protected TextView tv2;
+    protected TextView tv3;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_base_layout);
+
+        iv0 = (ImageView)findViewById(R.id.image0);
+        btn0 = (Button)findViewById(R.id.btn0);
+        tv0 = (TextView)findViewById(R.id.tv0);
+        tv1 = (TextView)findViewById(R.id.tv1);
+        tv2 = (TextView)findViewById(R.id.tv2);
+        tv3 = (TextView)findViewById(R.id.tv3);
+
+        tv0.setText(getTitle());
+
+        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
+        Date now = new Date();
+        String strDate = sdf.format(now);
+        tv1.setText(strDate);
+    }
+
+    protected void log(String message) {
+        Log.d(getPackageName(), message);
+    }
+}
diff --git a/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/MockHotwordEnrollmentActivity.java b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/MockHotwordEnrollmentActivity.java
new file mode 100644
index 0000000..c05624d
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/MockHotwordEnrollmentActivity.java
@@ -0,0 +1,27 @@
+package com.google.android.tv.setup.validation;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+
+import com.google.android.tv.setup.BaseActivity;
+
+public class MockHotwordEnrollmentActivity extends BaseActivity {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        iv0.setVisibility(View.VISIBLE);
+        iv0.setImageResource(R.drawable.hotword_enrollment);
+
+        btn0.setVisibility(View.VISIBLE);
+        btn0.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setResult(Activity.RESULT_OK);
+                finish();
+            }
+        });
+    }
+}
diff --git a/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/OpaqueActivity.java b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/OpaqueActivity.java
new file mode 100644
index 0000000..2ebf60d
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/OpaqueActivity.java
@@ -0,0 +1,27 @@
+package com.google.android.tv.setup.validation;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+
+import com.google.android.tv.setup.BaseActivity;
+
+public class OpaqueActivity extends BaseActivity {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        iv0.setVisibility(View.VISIBLE);
+        iv0.setImageResource(R.drawable.opaque_tile);
+
+        btn0.setVisibility(View.VISIBLE);
+        btn0.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setResult(Activity.RESULT_OK);
+                finish();
+            }
+        });
+    }
+}
diff --git a/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/TransparentActivity.java b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/TransparentActivity.java
new file mode 100644
index 0000000..7b379ab
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/java/com/google/android/tv/setup/validation/TransparentActivity.java
@@ -0,0 +1,27 @@
+package com.google.android.tv.setup.validation;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+
+import com.google.android.tv.setup.BaseActivity;
+
+public class TransparentActivity extends BaseActivity {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        iv0.setVisibility(View.VISIBLE);
+        iv0.setImageResource(R.drawable.opaque_tile);
+
+        btn0.setVisibility(View.VISIBLE);
+        btn0.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setResult(Activity.RESULT_OK);
+                finish();
+            }
+        });
+    }
+}
diff --git a/apps/TvSetupValidation/app/src/main/res/drawable-xhdpi/hotword_enrollment.png b/apps/TvSetupValidation/app/src/main/res/drawable-xhdpi/hotword_enrollment.png
new file mode 100644
index 0000000..c61f013
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/res/drawable-xhdpi/hotword_enrollment.png
Binary files differ
diff --git a/apps/TvSetupValidation/app/src/main/res/drawable-xhdpi/opaque_tile.png b/apps/TvSetupValidation/app/src/main/res/drawable-xhdpi/opaque_tile.png
new file mode 100644
index 0000000..ffe417c
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/res/drawable-xhdpi/opaque_tile.png
Binary files differ
diff --git a/apps/TvSetupValidation/app/src/main/res/layout/activity_base_layout.xml b/apps/TvSetupValidation/app/src/main/res/layout/activity_base_layout.xml
new file mode 100644
index 0000000..da44ab4
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/res/layout/activity_base_layout.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:tools="http://schemas.android.com/tools">
+
+    <ImageView
+        android:id="@+id/image0"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal|top"
+        android:layout_marginTop="60dp"
+        android:visibility="gone"
+        />
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_gravity="left|bottom"
+        >
+
+        <Button
+            android:id="@+id/btn0"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="Next"
+            android:visibility="gone"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            />
+
+        <TextView
+            android:id="@+id/tv0"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="24sp" />
+
+        <TextView
+            android:id="@+id/tv1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="12sp" />
+
+        <TextView
+            android:id="@+id/tv2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="12sp" />
+
+        <TextView
+            android:id="@+id/tv3"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="left|bottom"
+            android:gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginBottom="20dp"
+            tools:text="foobar"
+            android:textColor="@android:color/white"
+            android:textSize="12sp" />
+
+    </LinearLayout>
+
+</FrameLayout>
diff --git a/apps/TvSetupValidation/app/src/main/res/values/strings.xml b/apps/TvSetupValidation/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..25fe7ea
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+<resources>
+
+
+</resources>
diff --git a/apps/TvSetupValidation/app/src/main/res/values/styles.xml b/apps/TvSetupValidation/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..178c902
--- /dev/null
+++ b/apps/TvSetupValidation/app/src/main/res/values/styles.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <style name="AppTheme" parent="@style/Theme.Leanback">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowShowWallpaper">false</item>
+    </style>
+    
+    <style name="AppThemeOpaque" parent="@style/Theme.Leanback">
+        <item name="android:windowBackground">@android:color/holo_blue_light</item>
+    </style>
+
+</resources>
diff --git a/apps/TvSetupValidation/build.gradle b/apps/TvSetupValidation/build.gradle
new file mode 100644
index 0000000..e6b32bc
--- /dev/null
+++ b/apps/TvSetupValidation/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    
+    repositories {
+        google()
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.0.1'
+        
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}
diff --git a/apps/TvSetupValidation/gradle.properties b/apps/TvSetupValidation/gradle.properties
new file mode 100644
index 0000000..aac7c9b
--- /dev/null
+++ b/apps/TvSetupValidation/gradle.properties
@@ -0,0 +1,17 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
diff --git a/apps/TvSetupValidation/gradle/wrapper/gradle-wrapper.jar b/apps/TvSetupValidation/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
--- /dev/null
+++ b/apps/TvSetupValidation/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/apps/TvSetupValidation/gradle/wrapper/gradle-wrapper.properties b/apps/TvSetupValidation/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e03ba59
--- /dev/null
+++ b/apps/TvSetupValidation/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed May 09 12:57:15 PDT 2018
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
diff --git a/apps/TvSetupValidation/gradlew b/apps/TvSetupValidation/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/apps/TvSetupValidation/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/apps/TvSetupValidation/settings.gradle b/apps/TvSetupValidation/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/apps/TvSetupValidation/settings.gradle
@@ -0,0 +1 @@
+include ':app'