Make proper ATV SDK build
Ji-Hwan Lee [Mon, 12 May 2014 12:28:57 +0000 (21:28 +0900)]
For system images sdk_repo:
- Add SystemImage.{TagId,TagDisplay} to source.properties.
- Add devices.xml.

Change-Id: Ia761b37d2b32d063d927cef4bceb8f84c8b1f6ca

products/atv_sdk.mk
products/atv_skins.atree [deleted file]
sdk/Android.mk [new file with mode: 0644]
sdk/atv_sdk.atree [new file with mode: 0644]
sdk/devices.xml [new file with mode: 0644]
sdk/images_armeabi-v7a_source.prop_template [new file with mode: 0644]

index e4991fb..8e264e3 100644 (file)
@@ -15,7 +15,8 @@
 #
 
 PRODUCT_PACKAGES := \
-    audio.primary.goldfish
+    audio.primary.goldfish \
+    EmulatorSmokeTests
 
 PRODUCT_PACKAGE_OVERLAYS := \
     device/google/atv/sdk_overlay \
@@ -36,7 +37,7 @@ PRODUCT_AAPT_CONFIG := normal large xlarge tvdpi hdpi xhdpi xxhdpi
 # Add TV skins to SDK, in addition to (not replacing) original SDK tree
 PRODUCT_SDK_ATREE_FILES := \
     development/build/sdk.atree \
-    device/google/atv/products/atv_skins.atree
+    device/google/atv/sdk/atv_sdk.atree
 
 # Define the host tools and libs that are parts of the SDK.
 -include sdk/build/product_sdk.mk
diff --git a/products/atv_skins.atree b/products/atv_skins.atree
deleted file mode 100644 (file)
index 3aa0e21..0000000
+++ /dev/null
@@ -1,18 +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.
-#
-
-# Android TV skins
-device/google/atv/skins/AndroidTV   system-images/${PLATFORM_NAME}/armeabi-v7a/skins/AndroidTV
diff --git a/sdk/Android.mk b/sdk/Android.mk
new file mode 100644 (file)
index 0000000..4ad544e
--- /dev/null
@@ -0,0 +1,17 @@
+ifneq ($(filter atv_sdk atv_google_sdk,$(TARGET_PRODUCT)),)
+# Refer to development/build/Android.mk
+source_properties_file := \
+    $(HOST_OUT)/device/google/atv/sdk/images_$(TARGET_CPU_ABI)_source.properties
+
+ALL_SDK_FILES += $(source_properties_file)
+
+$(source_properties_file): $(TOPDIR)device/google/atv/sdk/images_$(TARGET_CPU_ABI)_source.prop_template
+       @echo Generate $@
+       $(hide) mkdir -p $(dir $@)
+       $(hide) sed -e 's/$${PLATFORM_VERSION}/$(PLATFORM_VERSION)/' \
+                -e 's/$${PLATFORM_SDK_VERSION}/$(PLATFORM_SDK_VERSION)/' \
+                -e 's/$${PLATFORM_VERSION_CODENAME}/$(subst REL,,$(PLATFORM_VERSION_CODENAME))/' \
+                $< > $@ && sed -i -e '/^AndroidVersion.CodeName=\s*$$/d' $@
+
+source_properties_file :=
+endif # ATV SDK build
diff --git a/sdk/atv_sdk.atree b/sdk/atv_sdk.atree
new file mode 100644 (file)
index 0000000..d73b193
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+# Override source.properties in development/build/sdk-android-${TARGET_CPU_ABI}.atree
+${HOST_OUT}/device/google/atv/sdk/images_${TARGET_CPU_ABI}_source.properties  system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties
+
+# devices.xml file with custom device definitions
+device/google/atv/sdk/devices.xml   system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/devices.xml
+
+# Android TV skins
+device/google/atv/skins/AndroidTV   system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/skins/AndroidTV
diff --git a/sdk/devices.xml b/sdk/devices.xml
new file mode 100644 (file)
index 0000000..98ec1bf
--- /dev/null
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<d:devices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:d="http://schemas.android.com/sdk/devices/1">
+
+    <d:device>
+        <d:name>Android TV (1080p)</d:name>
+        <d:manufacturer>Google</d:manufacturer>
+        <d:hardware>
+            <d:screen>
+                <d:screen-size>xlarge</d:screen-size>
+                <d:diagonal-length>55.0</d:diagonal-length>
+                <d:pixel-density>xhdpi</d:pixel-density>
+                <d:screen-ratio>long</d:screen-ratio>
+                <d:dimensions>
+                    <d:x-dimension>1920</d:x-dimension>
+                    <d:y-dimension>1080</d:y-dimension>
+                </d:dimensions>
+                <d:xdpi>40.05</d:xdpi>
+                <d:ydpi>40.05</d:ydpi>
+                <d:touch>
+                    <d:multitouch>none</d:multitouch>
+                    <d:mechanism>notouch</d:mechanism>
+                    <d:screen-type>notouch</d:screen-type>
+                </d:touch>
+            </d:screen>
+            <d:networking>
+                Bluetooth
+                Wifi
+                NFC
+            </d:networking>
+            <d:sensors>
+                LightSensor
+            </d:sensors>
+            <d:mic>true</d:mic>
+            <d:keyboard>qwerty</d:keyboard>
+            <d:nav>dpad</d:nav>
+            <d:ram unit="GiB">2</d:ram>
+            <d:buttons>hard</d:buttons>
+            <d:internal-storage unit="KiB">7811891</d:internal-storage>
+            <d:removable-storage unit="MiB">0</d:removable-storage>
+            <d:cpu>Generic CPU</d:cpu>
+            <d:gpu>Generic GPU</d:gpu>
+            <d:abi>
+                armeabi-v7a
+                x86
+            </d:abi>
+            <d:dock/>
+            <d:power-type>plugged-in</d:power-type>
+        </d:hardware>
+        <d:software>
+            <d:api-level>19-</d:api-level>
+            <d:live-wallpaper-support>true</d:live-wallpaper-support>
+            <d:bluetooth-profiles/>
+            <d:gl-version>2.0</d:gl-version>
+            <d:gl-extensions/>
+            <d:status-bar>false</d:status-bar>
+        </d:software>
+        <d:state name="Landscape" default="true">
+            <d:description>The device in landscape orientation</d:description>
+            <d:screen-orientation>land</d:screen-orientation>
+            <d:keyboard-state>keyshidden</d:keyboard-state>
+            <d:nav-state>navexposed</d:nav-state>
+        </d:state>
+        <d:state name="Landscape with keyboard">
+            <d:description>The device in landscape orientation with a keyboard open</d:description>
+            <d:screen-orientation>land</d:screen-orientation>
+            <d:keyboard-state>keysexposed</d:keyboard-state>
+            <d:nav-state>navexposed</d:nav-state>
+        </d:state>
+        <d:tag-id>android-tv</d:tag-id>
+    </d:device>
+
+    <d:device>
+        <d:name>Android TV (720p)</d:name>
+        <d:manufacturer>Google</d:manufacturer>
+        <d:hardware>
+            <d:screen>
+                <d:screen-size>xlarge</d:screen-size>
+                <d:diagonal-length>55.0</d:diagonal-length>
+                <d:pixel-density>tvdpi</d:pixel-density>
+                <d:screen-ratio>long</d:screen-ratio>
+                <d:dimensions>
+                    <d:x-dimension>1280</d:x-dimension>
+                    <d:y-dimension>720</d:y-dimension>
+                </d:dimensions>
+                <d:xdpi>26.70</d:xdpi>
+                <d:ydpi>26.70</d:ydpi>
+                <d:touch>
+                    <d:multitouch>none</d:multitouch>
+                    <d:mechanism>notouch</d:mechanism>
+                    <d:screen-type>notouch</d:screen-type>
+                </d:touch>
+            </d:screen>
+            <d:networking>
+                Bluetooth
+                Wifi
+                NFC
+            </d:networking>
+            <d:sensors>
+                LightSensor
+            </d:sensors>
+            <d:mic>true</d:mic>
+            <d:keyboard>qwerty</d:keyboard>
+            <d:nav>dpad</d:nav>
+            <d:ram unit="GiB">2</d:ram>
+            <d:buttons>hard</d:buttons>
+            <d:internal-storage unit="KiB">7811891</d:internal-storage>
+            <d:removable-storage unit="MiB">0</d:removable-storage>
+            <d:cpu>Generic CPU</d:cpu>
+            <d:gpu>Generic GPU</d:gpu>
+            <d:abi>
+                armeabi-v7a
+                x86
+            </d:abi>
+            <d:dock/>
+            <d:power-type>plugged-in</d:power-type>
+        </d:hardware>
+        <d:software>
+            <d:api-level>19-</d:api-level>
+            <d:live-wallpaper-support>true</d:live-wallpaper-support>
+            <d:bluetooth-profiles/>
+            <d:gl-version>2.0</d:gl-version>
+            <d:gl-extensions/>
+            <d:status-bar>false</d:status-bar>
+        </d:software>
+        <d:state name="Landscape" default="true">
+            <d:description>The device in landscape orientation</d:description>
+            <d:screen-orientation>land</d:screen-orientation>
+            <d:keyboard-state>keyshidden</d:keyboard-state>
+            <d:nav-state>navexposed</d:nav-state>
+        </d:state>
+        <d:state name="Landscape with keyboard">
+            <d:description>The device in landscape orientation with a keyboard open</d:description>
+            <d:screen-orientation>land</d:screen-orientation>
+            <d:keyboard-state>keysexposed</d:keyboard-state>
+            <d:nav-state>navexposed</d:nav-state>
+        </d:state>
+        <d:tag-id>android-tv</d:tag-id>
+    </d:device>
+
+</d:devices>
diff --git a/sdk/images_armeabi-v7a_source.prop_template b/sdk/images_armeabi-v7a_source.prop_template
new file mode 100644 (file)
index 0000000..d38fe89
--- /dev/null
@@ -0,0 +1,9 @@
+Pkg.Desc=Android SDK Platform ${PLATFORM_VERSION}
+Pkg.UserSrc=false
+Pkg.Revision=1
+AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
+AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
+SystemImage.Abi=armeabi-v7a
+SystemImage.GpuSupport=true
+SystemImage.TagId=android-tv
+SystemImage.TagDisplay=Android TV