Merge "Track move of timezone classes to libcore.timezone"
diff --git a/Android.mk b/Android.mk
index 888404c..1711bfd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,3 +1,18 @@
+# -*- mode: makefile -*-
+# 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.
+
 LOCAL_PATH := $(call my-dir)
 
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/apex/Android.bp b/apex/Android.bp
index 80382a7..8bcb734 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -26,7 +26,7 @@
 
 apex_key {
     name: "apex.tzdata.key",
-    public_key: "tzdata.avbpubkey",
-    private_key: "tzdata.pem",
+    public_key: "com.android.tzdata.avbpubkey",
+    private_key: "com.android.tzdata.pem",
 }
 
diff --git a/apex/tzdata.avbpubkey b/apex/com.android.tzdata.avbpubkey
similarity index 100%
rename from apex/tzdata.avbpubkey
rename to apex/com.android.tzdata.avbpubkey
Binary files differ
diff --git a/apex/tzdata.pem b/apex/com.android.tzdata.pem
similarity index 100%
rename from apex/tzdata.pem
rename to apex/com.android.tzdata.pem
diff --git a/distro/installer/Android.bp b/distro/installer/Android.bp
index e954c8f..75c1939 100644
--- a/distro/installer/Android.bp
+++ b/distro/installer/Android.bp
@@ -27,7 +27,7 @@
     srcs: ["src/test/**/*.java"],
     static_libs: [
         "time_zone_distro",
-        "time_zone_distro_tools",
+        "time_zone_distro_builder",
         "time_zone_distro_installer",
         "tzdata-testing",
         "junit",
diff --git a/distro/installer/src/test/com/android/timezone/distro/installer/TimeZoneDistroInstallerTest.java b/distro/installer/src/test/com/android/timezone/distro/installer/TimeZoneDistroInstallerTest.java
index da9f671..bdbbc70 100644
--- a/distro/installer/src/test/com/android/timezone/distro/installer/TimeZoneDistroInstallerTest.java
+++ b/distro/installer/src/test/com/android/timezone/distro/installer/TimeZoneDistroInstallerTest.java
@@ -19,7 +19,7 @@
 import com.android.timezone.distro.FileUtils;
 import com.android.timezone.distro.StagedDistroOperation;
 import com.android.timezone.distro.TimeZoneDistro;
-import com.android.timezone.distro.tools.TimeZoneDistroBuilder;
+import com.android.timezone.distro.builder.TimeZoneDistroBuilder;
 
 import junit.framework.TestCase;
 
diff --git a/distro/tools/Android.bp b/distro/tools/Android.bp
index ab87adb..0495983 100644
--- a/distro/tools/Android.bp
+++ b/distro/tools/Android.bp
@@ -12,15 +12,24 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// Library of tools classes for creating / interpreting time zone distros.
-// Used when generating distros and in host-side tests.
-java_library {
-    name: "time_zone_distro_tools",
-    host_supported: true,
+// The tool used to create time zone distro.zip files.
+java_library_host {
+    name: "create_time_zone_distro",
 
     srcs: ["src/main/**/*.java"],
     libs: [
         "time_zone_distro",
     ],
+}
+
+// Code that can build a time zone distro.zip. Used in tests.
+java_library {
+    name: "time_zone_distro_builder",
+    host_supported: true,
+
+    srcs: ["src/main/**/builder/*.java"],
+    libs: [
+        "time_zone_distro",
+    ],
     no_framework_libs: true,
 }
diff --git a/distro/tools/create-distro.py b/distro/tools/create-distro.py
index f4d6a1c..ad665f6 100755
--- a/distro/tools/create-distro.py
+++ b/distro/tools/create-distro.py
@@ -33,10 +33,10 @@
 
 def RunCreateTimeZoneDistro(properties_file):
   # Build the libraries needed.
-  subprocess.check_call(['make', '-C', android_build_top, 'time_zone_distro_tools',
+  subprocess.check_call(['make', '-C', android_build_top, 'create_time_zone_distro',
       'time_zone_distro'])
 
-  libs = [ 'time_zone_distro_tools', 'time_zone_distro' ]
+  libs = [ 'create_time_zone_distro', 'time_zone_distro' ]
   host_java_libs_dir = '%s/../common/obj/JAVA_LIBRARIES' % android_host_out_dir
   classpath_components = []
   for lib in libs:
diff --git a/distro/tools/src/main/com/android/timezone/distro/tools/TimeZoneDistroBuilder.java b/distro/tools/src/main/com/android/timezone/distro/builder/TimeZoneDistroBuilder.java
similarity index 99%
rename from distro/tools/src/main/com/android/timezone/distro/tools/TimeZoneDistroBuilder.java
rename to distro/tools/src/main/com/android/timezone/distro/builder/TimeZoneDistroBuilder.java
index ed21aeb..4540608 100644
--- a/distro/tools/src/main/com/android/timezone/distro/tools/TimeZoneDistroBuilder.java
+++ b/distro/tools/src/main/com/android/timezone/distro/builder/TimeZoneDistroBuilder.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.timezone.distro.tools;
+package com.android.timezone.distro.builder;
 
 import com.android.timezone.distro.DistroException;
 import com.android.timezone.distro.DistroVersion;
diff --git a/distro/tools/src/main/com/android/timezone/distro/tools/CreateTimeZoneDistro.java b/distro/tools/src/main/com/android/timezone/distro/tools/CreateTimeZoneDistro.java
index b29fba7..06698ea 100644
--- a/distro/tools/src/main/com/android/timezone/distro/tools/CreateTimeZoneDistro.java
+++ b/distro/tools/src/main/com/android/timezone/distro/tools/CreateTimeZoneDistro.java
@@ -19,6 +19,7 @@
 
 import com.android.timezone.distro.DistroVersion;
 import com.android.timezone.distro.TimeZoneDistro;
+import com.android.timezone.distro.builder.TimeZoneDistroBuilder;
 
 import java.io.File;
 import java.io.FileInputStream;
diff --git a/output_data/Android.mk b/output_data/Android.mk
index 888404c..1711bfd 100644
--- a/output_data/Android.mk
+++ b/output_data/Android.mk
@@ -1,3 +1,18 @@
+# -*- mode: makefile -*-
+# 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.
+
 LOCAL_PATH := $(call my-dir)
 
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/output_data/android/Android.mk b/output_data/android/Android.mk
index 10f3caa..178454a 100644
--- a/output_data/android/Android.mk
+++ b/output_data/android/Android.mk
@@ -1,8 +1,22 @@
+# -*- mode: makefile -*-
+# 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.
+
 LOCAL_PATH:= $(call my-dir)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := tzlookup.xml
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 LOCAL_SRC_FILES := $(LOCAL_MODULE)
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_TAGS := optional
@@ -16,7 +30,6 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := tzlookup.xml
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 LOCAL_IS_HOST_MODULE := true
 LOCAL_SRC_FILES := tzlookup.xml
 LOCAL_MODULE_CLASS := ETC
diff --git a/output_data/iana/Android.mk b/output_data/iana/Android.mk
index 5aafd17..a6b55f6 100644
--- a/output_data/iana/Android.mk
+++ b/output_data/iana/Android.mk
@@ -1,8 +1,22 @@
+# -*- mode: makefile -*-
+# 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.
+
 LOCAL_PATH:= $(call my-dir)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := tzdata
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 LOCAL_SRC_FILES := $(LOCAL_MODULE)
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_TAGS := optional
@@ -16,7 +30,6 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := tzdata
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 LOCAL_IS_HOST_MODULE := true
 LOCAL_SRC_FILES := tzdata
 LOCAL_MODULE_CLASS := ETC