Add Android Things build target for Cuttlefish.

Bug: 78638727
Test: Boots.
Change-Id: I84cec612a3a97c35fb8033544f81ea34a9133b93
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index d08f57f..d560e81 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -22,6 +22,7 @@
 	aosp_cf_x86_64_tv:$(LOCAL_DIR)/vsoc_x86_64/tv/device.mk \
 	aosp_cf_x86_64_wear:$(LOCAL_DIR)/vsoc_x86_64/wear/device.mk \
 	aosp_cf_x86_auto:$(LOCAL_DIR)/vsoc_x86/auto/device.mk \
+	aosp_cf_x86_iot:$(LOCAL_DIR)/vsoc_x86/iot/device.mk \
 	aosp_cf_x86_phone:$(LOCAL_DIR)/vsoc_x86/phone/device.mk \
 	aosp_cf_x86_tablet:$(LOCAL_DIR)/vsoc_x86/tablet/device.mk \
 	aosp_cf_x86_tablet_3g:$(LOCAL_DIR)/vsoc_x86/tablet_3g/device.mk \
@@ -30,6 +31,7 @@
 
 COMMON_LUNCH_CHOICES := \
 	aosp_cf_x86_auto-userdebug \
+	aosp_cf_x86_iot-userdebug \
 	aosp_cf_x86_phone-userdebug \
 	aosp_cf_x86_tablet-userdebug \
 	aosp_cf_x86_tablet_3g-userdebug \
diff --git a/vsoc_x86/iot/device.mk b/vsoc_x86/iot/device.mk
new file mode 100644
index 0000000..1a8f577
--- /dev/null
+++ b/vsoc_x86/iot/device.mk
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2018 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.
+#
+
+$(call inherit-product, device/google/iot/iot_base.mk)
+$(call inherit-product, device/google/iot/iot_cts_compatible.mk)
+$(call inherit-product, device/google/cuttlefish/shared/device.mk)
+
+PRODUCT_NAME := aosp_cf_x86_iot
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 IoT
+PRODUCT_PACKAGE_OVERLAYS := device/google/cuttlefish/vsoc_x86/iot/overlay
diff --git a/vsoc_x86/iot/overlay/frameworks/base/core/res/res/values/config.xml b/vsoc_x86/iot/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..d5dca9a
--- /dev/null
+++ b/vsoc_x86/iot/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="networkAttributes" translatable="false">
+    <item>"wifi,1,1,1,-1,true"</item>
+    <item>"bluetooth,7,7,2,-1,true"</item>
+  </string-array>
+  <string-array name="radioAttributes" translatable="false">
+    <item>"1,1"</item>
+    <item>"7,1"</item>
+  </string-array>
+  <string-array name="config_tether_wifi_regexs" translatable="false">
+    <item>"wlan0"</item>
+  </string-array>
+  <bool name="config_wifi_dual_band_support" translatable="false">true</bool>
+  <bool name="config_bluetooth_address_validation">true</bool>
+  <bool name="config_showNavigationBar">false</bool>
+  <dimen name="config_viewConfigurationTouchSlop">12dp</dimen>
+  <!-- cuttlefish uses mac80211-hwsim, which does not support Preferred
+  Network Offload feature. We disable the use of this feature here. -->
+  <bool translatable="false" name="config_wifi_background_scan_support">false</bool>
+  <!--  Maximum number of supported users -->
+  <integer name="config_multiuserMaximumUsers">1</integer>
+
+  <!-- Needed for CTS -->
+  <!-- Use the default VPN confirm dialog -->
+  <string name="config_customVpnConfirmDialogComponent" translatable="false"
+          >com.android.vpndialogs/com.android.vpndialogs.ConfirmDialog</string>
+
+  <!-- True if WallpaperService is enabled -->
+  <bool name="config_enableWallpaperService">true</bool>
+</resources>
diff --git a/vsoc_x86/iot/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/vsoc_x86/iot/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..3596723
--- /dev/null
+++ b/vsoc_x86/iot/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2018, 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.
+ */
+-->
+<resources>
+    <bool name="def_bluetooth_on">true</bool>
+    <bool name="def_wifi_on">true</bool>
+    <bool name="def_stay_on_while_plugged_in">true</bool>
+    <bool name="def_device_provisioned">true</bool>
+    <bool name="def_user_setup_complete">true</bool>
+    <bool name="def_package_verifier_enable">false</bool>
+</resources>