summaryrefslogtreecommitdiff
path: root/oem_template/data_app
diff options
context:
space:
mode:
Diffstat (limited to 'oem_template/data_app')
-rw-r--r--oem_template/data_app/AndroidManifest.xml62
-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
4 files changed, 85 insertions, 16 deletions
diff --git a/oem_template/data_app/AndroidManifest.xml b/oem_template/data_app/AndroidManifest.xml
new file mode 100644
index 0000000..1f4046c
--- /dev/null
+++ b/oem_template/data_app/AndroidManifest.xml
@@ -0,0 +1,62 @@
+<?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.
+ -->
+<!-- OEM-INSTRUCTION: Change the package attribute to something OEM-specific. -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ 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"
+ 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="INSTALL"/>
+ </provider>
+ </application>
+</manifest>
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