summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-10-03 07:21:30 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-10-03 07:21:30 +0000
commitefdc0f9934ff282484c7b44d0e8ac082c19055c8 (patch)
treee48ae03de13332537041a254a3471bce5044e78d
parent8a8ac7e1832a969d44b76c59201a9bb744a6bf95 (diff)
parentfdd085a469cd71ac84924de4e1e6247fc6011f9f (diff)
downloadTimeZoneData-oreo-mr1-release.tar.gz
Snap for 4373604 from fdd085a469cd71ac84924de4e1e6247fc6011f9f to oc-mr1-releaseandroid-wear-8.1.0_r1android-vts-8.1_r9android-vts-8.1_r8android-vts-8.1_r7android-vts-8.1_r6android-vts-8.1_r5android-vts-8.1_r4android-vts-8.1_r3android-vts-8.1_r14android-vts-8.1_r13android-vts-8.1_r12android-vts-8.1_r11android-vts-8.1_r10android-security-8.1.0_r93android-security-8.1.0_r92android-security-8.1.0_r91android-security-8.1.0_r90android-security-8.1.0_r89android-security-8.1.0_r88android-security-8.1.0_r87android-security-8.1.0_r86android-security-8.1.0_r85android-security-8.1.0_r84android-security-8.1.0_r83android-security-8.1.0_r82android-cts-8.1_r9android-cts-8.1_r8android-cts-8.1_r7android-cts-8.1_r6android-cts-8.1_r5android-cts-8.1_r4android-cts-8.1_r3android-cts-8.1_r25android-cts-8.1_r24android-cts-8.1_r23android-cts-8.1_r22android-cts-8.1_r21android-cts-8.1_r20android-cts-8.1_r2android-cts-8.1_r19android-cts-8.1_r18android-cts-8.1_r17android-cts-8.1_r16android-cts-8.1_r15android-cts-8.1_r14android-cts-8.1_r13android-cts-8.1_r12android-cts-8.1_r11android-cts-8.1_r10android-cts-8.1_r1android-8.1.0_r81android-8.1.0_r80android-8.1.0_r79android-8.1.0_r78android-8.1.0_r77android-8.1.0_r76android-8.1.0_r75android-8.1.0_r74android-8.1.0_r73android-8.1.0_r72android-8.1.0_r71android-8.1.0_r70android-8.1.0_r69android-8.1.0_r68android-8.1.0_r66android-8.1.0_r6android-8.1.0_r5android-8.1.0_r4android-8.1.0_r3android-8.1.0_r23android-8.1.0_r19android-8.1.0_r16android-8.1.0_r15android-8.1.0_r12android-8.1.0_r11android-8.1.0_r10android-8.1.0_r1security-oc-mr1-releaseoreo-mr1-wear-releaseoreo-mr1-vts-releaseoreo-mr1-security-releaseoreo-mr1-s1-releaseoreo-mr1-releaseoreo-mr1-cuttlefish-testingoreo-mr1-cts-releaseoreo-m4-s1-release
Change-Id: Ieca12d3e7df43fcf64038427e2b414d82c2fe1f8
-rw-r--r--manifests/uninstall/AndroidManifest.xml34
-rw-r--r--oem_template/data_app/AndroidManifest.xml (renamed from manifests/install/AndroidManifest.xml)30
-rw-r--r--oem_template/data_app/README.oem20
-rw-r--r--oem_template/data_app/build_oem_data_app.mk15
-rw-r--r--oem_template/data_app/testing/build_oem_test_data_app.mk4
-rw-r--r--oem_template/data_app_prebuilt/Android.mk24
-rw-r--r--oem_template/data_app_prebuilt/README.oem21
-rw-r--r--oem_template/data_app_prebuilt/include_app_prebuilt.mk40
-rw-r--r--oem_template/data_app_prebuilt/testing/Android.mk26
-rw-r--r--oem_template/data_app_prebuilt/testing/include_test_prebuilt.mk37
-rw-r--r--oem_template/xts/AndroidTest.xml6
-rw-r--r--oem_template/xts/README.oem6
12 files changed, 209 insertions, 54 deletions
diff --git a/manifests/uninstall/AndroidManifest.xml b/manifests/uninstall/AndroidManifest.xml
deleted file mode 100644
index 598a2be..0000000
--- a/manifests/uninstall/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2017 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.
- -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.timezone.data.placeholder_for_aapt_override">
-
- <application
- android:allowBackup="false"
- android:label="@string/app_name">
-
- <provider
- android:name="com.android.timezone.data.TimeZoneRulesDataProvider"
- android:authorities="com.android.timezone"
- android:grantUriPermissions="true"
- android:readPermission="android.permission.UPDATE_TIME_ZONE_RULES"
- android:exported="true">
- <meta-data android:name="android.timezoneprovider.OPERATION"
- android:value="UNINSTALL"/>
- </provider>
- </application>
-</manifest>
diff --git a/manifests/install/AndroidManifest.xml b/oem_template/data_app/AndroidManifest.xml
index 45a8003..1f4046c 100644
--- a/manifests/install/AndroidManifest.xml
+++ b/oem_template/data_app/AndroidManifest.xml
@@ -14,8 +14,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
+<!-- OEM-INSTRUCTION: Change the package attribute to something OEM-specific. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.timezone.data.placeholder_for_aapt_override">
+ package="CHANGE">
+
+ <!--
+ OEM-INSTRUCTION: Change these to match the platform release the app is
+ for and update for every platform release to ensure the app is only
+ installed on the release it is targeted for. Typically, all values should
+ be the same unless two Android releases use the same distro format
+ version.
+
+ Your app version code strategy and the version of the app included in the
+ system image should be chosen to prevent older versions of the app being
+ installed on newer Android devices.
+ minSdkVersion will prevent newer versions of the app being installed on
+ older devices.
+ maxSdkVersion is not used by the device, but can be used by app stores to
+ prevent the app being shown to users of newer devices.
+ -->
+ <uses-sdk android:minSdkVersion="CHANGE"
+ android:targetSdkVersion="CHANGE"
+ android:maxSdkVersion="CHANGE" />
+
+ <!--
+ OEM-INSTRUCTION: Optionally restrict the app to an OEM-specific feature,
+ or remove the element entirely.
+ -->
+ <uses-feature
+ android:name="CHANGE"
+ android:required="true"/>
<application
android:allowBackup="false"
diff --git a/oem_template/data_app/README.oem b/oem_template/data_app/README.oem
index e3dbe37..f288adf 100644
--- a/oem_template/data_app/README.oem
+++ b/oem_template/data_app/README.oem
@@ -5,10 +5,24 @@ OEM-INSTRUCTION See below for the purpose of this directory and changes OEMs mus
This directory contains a suggested structure for building an OEM version of Time Zone Data app
(real and test versions).
-e.g. You can copy it
+For example, you can copy it
-cp -r data_app ${ANDROID_BUILD_TOP}/vendor/oemcorp/apps/TimeZoneDataOemCorp
+cp -r data_app ${ANDROID_BUILD_TOP}/vendor/oemcorp/apps/TimeZoneData
Where <oemcorp> is your company name.
-...then read / change all the things marked with OEM-INSTRUCTION. \ No newline at end of file
+...then read / change all the things marked with OEM-INSTRUCTION.
+
+The intended use is for inclusion in a tapas build to generate .apks. The targets define the
+real version of the app, and some test versions that can be used by the supplied xTS tests.
+
+The generated .apks are expected to be signed and checked in as "prebuilts" for the system
+image and for xTS testing.
+
+The main, signed .apk can also be uploaded to an app store and used to update existing
+devices.
+
+See oem_template/data_app_prebuilts for rules that can be used to include the prebuilts in
+the system image and tests.
+
+See oem_template/xts for rules that can be used for xTS testing.
diff --git a/oem_template/data_app/build_oem_data_app.mk b/oem_template/data_app/build_oem_data_app.mk
index 7d9e611..f31e5d1 100644
--- a/oem_template/data_app/build_oem_data_app.mk
+++ b/oem_template/data_app/build_oem_data_app.mk
@@ -32,16 +32,15 @@ LOCAL_STATIC_JAVA_LIBRARIES := time_zone_distro_provider
# All resources come from the vendor-specific dirs.
LOCAL_RESOURCE_DIR := $(OEM_APP_PATH)/res
-LOCAL_FULL_MANIFEST_FILE := packages/apps/TimeZoneData/manifests/install/AndroidManifest.xml
+# Ensure the app can be unbundled by only depending on System APIs.
+LOCAL_SDK_VERSION := system_current
+
+LOCAL_FULL_MANIFEST_FILE := $(OEM_APP_PATH)/AndroidManifest.xml
LOCAL_PACKAGE_NAME := TimeZoneData$(TIME_ZONE_DATA_APP_SUFFIX)
LOCAL_AAPT_FLAGS := --version-code $(TIME_ZONE_DATA_APP_VERSION_CODE) \
- --version-name $(TIME_ZONE_DATA_APP_VERSION_NAME) \
- --min-sdk-version $(PLATFORM_SDK_VERSION)
-
-# OEM-INSTRUCTION: Modify the name, s/oemcorp/<Your company name>/
-LOCAL_AAPT_FLAGS += --rename-manifest-package com.oemcorp.android.timezone.data
+ --version-name $(TIME_ZONE_DATA_APP_VERSION_NAME)
# OEM-INSTRUCTION: Modify the name, s/oemcorp/<Your company name>/
LOCAL_MODULE_OWNER := oemcorp
@@ -50,6 +49,4 @@ LOCAL_PRIVILEGED_MODULE := true
# OEM-INSTRUCTION: Configure your own certificate.
LOCAL_CERTIFICATE :=
-# If LOCAL_COMPATIBILITY_SUITE is unset this is the same as BUILD_PACKAGE so
-# can be used for building test or production packages.
-include $(BUILD_CTS_PACKAGE)
+include $(BUILD_PACKAGE)
diff --git a/oem_template/data_app/testing/build_oem_test_data_app.mk b/oem_template/data_app/testing/build_oem_test_data_app.mk
index 4ed18ef..309c726 100644
--- a/oem_template/data_app/testing/build_oem_test_data_app.mk
+++ b/oem_template/data_app/testing/build_oem_test_data_app.mk
@@ -23,8 +23,4 @@
#
OEM_APP_PATH := $(LOCAL_PATH)/..
-
-# OEM-INSTRUCTION: Change this to the appropriate test suite(s).
-LOCAL_COMPATIBILITY_SUITE := xts
-
include $(OEM_APP_PATH)/build_oem_data_app.mk
diff --git a/oem_template/data_app_prebuilt/Android.mk b/oem_template/data_app_prebuilt/Android.mk
new file mode 100644
index 0000000..ab09e4d
--- /dev/null
+++ b/oem_template/data_app_prebuilt/Android.mk
@@ -0,0 +1,24 @@
+# Copyright (C) 2017 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.
+
+# Targets for including the real signed versions of the time zone data app.
+
+LOCAL_PATH := $(call my-dir)
+
+# Defines the TimeZoneDataPrebuilt prebuilt target.
+include $(CLEAR_VARS)
+TIME_ZONE_DATA_APP_SUFFIX :=
+include $(LOCAL_PATH)/include_app_prebuilt.mk
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/oem_template/data_app_prebuilt/README.oem b/oem_template/data_app_prebuilt/README.oem
new file mode 100644
index 0000000..0ce548f
--- /dev/null
+++ b/oem_template/data_app_prebuilt/README.oem
@@ -0,0 +1,21 @@
+This file originates from package/apps/TimeZoneData/oem_template/data_app_prebuilt.
+
+OEM-INSTRUCTION See below for the purpose of this directory and changes OEMs must make.
+
+This directory contains a suggested structure for including prebuilt .apks in the
+system image and tests.
+
+For example, you can copy it
+
+cp -r data_app_prebuilt ${ANDROID_BUILD_TOP}/vendor/oemcorp/apps/TimeZoneDataPrebuilt
+
+Where <oemcorp> is your company name.
+
+...then read / change all the things marked with OEM-INSTRUCTION.
+
+The intended use is to include .apk artifacts built using the oem_template/data_app.
+
+The targets define includes the real version of the app, and some test versions that can be
+used by the supplied xTS tests.
+
+See oem_template/xts for rules that can be used for xTS testing.
diff --git a/oem_template/data_app_prebuilt/include_app_prebuilt.mk b/oem_template/data_app_prebuilt/include_app_prebuilt.mk
new file mode 100644
index 0000000..f4c6be9
--- /dev/null
+++ b/oem_template/data_app_prebuilt/include_app_prebuilt.mk
@@ -0,0 +1,40 @@
+# Copyright (C) 2017 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.
+
+# An .mk include file that contains the boilerplate needed to include real and
+# test, OEM-specific Time Zone Data app prebuilts.
+#
+# Users should set:
+# TIME_ZONE_DATA_APP_SUFFIX - the suffix to apply to the package name. Can be
+# empty, or contain things like _test1 for test .apk files.
+# LOCAL_COMPATIBILITY_SUITE - if the package is to be included in xTS tests.
+#
+
+LOCAL_MODULE := TimeZoneDataPrebuilt$(TIME_ZONE_DATA_APP_SUFFIX)
+LOCAL_SRC_FILES := TimeZoneData$(TIME_ZONE_DATA_APP_SUFFIX).apk
+LOCAL_OVERRIDES_PACKAGES := TimeZoneData$(TIME_ZONE_DATA_APP_SUFFIX)
+LOCAL_MODULE_TAGS := optional
+
+# OEM-INSTRUCTION: Change this
+LOCAL_MODULE_OWNER := oemcorp
+LOCAL_PRIVILEGED_MODULE := true
+
+LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
+LOCAL_MODULE_CLASS := APPS
+# OEM-INSTRUCTION: Change this to match your app-specific signing certificate.
+LOCAL_CERTIFICATE :=
+
+# If LOCAL_COMPATIBILITY_SUITE is set this also copies the APK to the appropriate xTS directory
+# and so this .mk can be used for prod and test targets.
+include $(BUILD_PREBUILT)
diff --git a/oem_template/data_app_prebuilt/testing/Android.mk b/oem_template/data_app_prebuilt/testing/Android.mk
new file mode 100644
index 0000000..9096088
--- /dev/null
+++ b/oem_template/data_app_prebuilt/testing/Android.mk
@@ -0,0 +1,26 @@
+# Copyright (C) 2017 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.
+
+# Targets for including testing versions of the time zone data app needed
+# by xTS tests.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+TIME_ZONE_DATA_APP_SUFFIX := _test1
+include $(LOCAL_PATH)/include_test_prebuilt.mk
+
+include $(CLEAR_VARS)
+TIME_ZONE_DATA_APP_SUFFIX := _test2
+include $(LOCAL_PATH)/include_test_prebuilt.mk
diff --git a/oem_template/data_app_prebuilt/testing/include_test_prebuilt.mk b/oem_template/data_app_prebuilt/testing/include_test_prebuilt.mk
new file mode 100644
index 0000000..b3b5b7c
--- /dev/null
+++ b/oem_template/data_app_prebuilt/testing/include_test_prebuilt.mk
@@ -0,0 +1,37 @@
+# Copyright (C) 2017 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.
+#
+# An .mk include file that contains the boilerplate needed to include test,
+# OEM-specific Time Zone Data app prebuilts.
+#
+# Users should set:
+# TIME_ZONE_DATA_APP_SUFFIX - the suffix to apply to the package name.
+# Should contain things like _test1 for test .apk files.
+#
+
+PREBUILT_PATH := $(LOCAL_PATH)/..
+
+# Turn off pre-opting. We want these to be installable.
+LOCAL_DEX_PREOPT := false
+
+# OEM-INSTRUCTION: Change this to match your OEM-specific test suite.
+# If a value is here the .apk will automatically be included in the associated
+# test suite build, e.g. if there is an oem-specific tradefed suite called "OTS",
+# then put ots here.
+# Required for the xTS TimeZoneUpdateHostTest to pass because it needs correctly
+# signed OEM-specific apks available to work.
+LOCAL_COMPATIBILITY_SUITE :=
+
+include $(PREBUILT_PATH)/include_app_prebuilt.mk
+
diff --git a/oem_template/xts/AndroidTest.xml b/oem_template/xts/AndroidTest.xml
index 1ef5206..cd86156 100644
--- a/oem_template/xts/AndroidTest.xml
+++ b/oem_template/xts/AndroidTest.xml
@@ -20,6 +20,12 @@
<option name="jar" value="XtsTimeZoneTestCases.jar" />
<!-- OEM-INSTRUCTION: Change this to match the package name of the data app -->
<option name="set-option" value="oem-data-app-package-name:com.oemcorp.android.timezone.data" />
+ <!-- OEM-INSTRUCTION: Change this to match the name of the target used to include the test .apks -->
+ <!--
+ This has to match the name of the .apk files included in the test
+ suite. For example, if the value below is "oem-data-app-apk-prefix:TimeZoneData"
+ the test will look for TimeZoneData_test1.apk and TimeZoneData_test2.apk, etc. during tests.
+ -->
<option name="set-option" value="oem-data-app-apk-prefix:TimeZoneData" />
</test>
</configuration>
diff --git a/oem_template/xts/README.oem b/oem_template/xts/README.oem
index 8921d2a..307724d 100644
--- a/oem_template/xts/README.oem
+++ b/oem_template/xts/README.oem
@@ -2,8 +2,8 @@ This file originates from package/apps/TimeZoneData/oem_template/xts.
OEM-INSTRUCTION See below for the purpose of this directory and changes to make.
-This directory contains a suggested structure for CTS-like host-side tests for checking the default
+This directory contains a suggested structure for CTS-like host-side tests for checking the
time zone update feature has been integrated properly.
-These tests are not CTS tests because the OEM must perform their own integration and provide their
-own OEM-specific signed time zone data app implementation under their own package.
+These tests are not included in CTS because the OEM must perform their own integration and
+provide their own OEM-specific signed time zone data app .apks under their own package.