Snap for 6439596 from e7178efb3ecd791282f16859885f10c0daeb5a81 to qt-aml-tzdata-release
Change-Id: I4fb25d8c8b070e508c0e6d5ca70543c6642b0055
diff --git a/Android.bp b/Android.bp
deleted file mode 100644
index 565a709..0000000
--- a/Android.bp
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Copyright (C) 2008 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.
-//
-
-//
-// Define rules to build temp_layoutlib.jar, which contains a subset of
-// the classes in framework.jar. The layoutlib_create tool is used to
-// transform the framework jar into the temp_layoutlib jar.
-//
-
-java_genrule_host {
- name: "temp_layoutlib",
- tools: ["layoutlib_create"],
- out: ["temp_layoutlib.jar"],
- srcs: [
- ":core-icu4j{.jar}",
- ":core-libart{.jar}",
- ":framework{.jar}",
- ":ext{.jar}",
- ":icu4j-icudata-jarjar{.jar}", // HOST
- ":icu4j-icutzdata-jarjar{.jar}", // HOST
- ],
- cmd: "rm -f $(out) && $(location layoutlib_create) --create-stub $(out) $(in)",
-}
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..ab9338e
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,90 @@
+#
+# Copyright (C) 2008 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.
+#
+ifeq (,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO))
+
+LOCAL_PATH := $(my-dir)
+include $(CLEAR_VARS)
+
+#
+# Define rules to build temp_layoutlib.jar, which contains a subset of
+# the classes in framework.jar. The layoutlib_create tool is used to
+# transform the framework jar into the temp_layoutlib jar.
+#
+
+# We need to process the framework classes.jar file, but we can't
+# depend directly on it (private vars won't be inherited correctly).
+# So, we depend on framework's BUILT file.
+built_framework_dep := $(call java-lib-deps,framework)
+built_framework_classes := $(call java-lib-files,framework)
+
+built_core_dep := $(call java-lib-deps,core-libart)
+built_core_classes := $(call java-lib-files,core-libart)
+
+built_ext_dep := $(call java-lib-deps,ext)
+built_ext_classes := $(call java-lib-files,ext)
+
+built_icudata_dep := $(call java-lib-deps,icu4j-icudata-jarjar,HOST)
+built_icutzdata_dep := $(call java-lib-deps,icu4j-icutzdata-jarjar,HOST)
+
+built_layoutlib_create_jar := $(call java-lib-files,layoutlib_create,HOST)
+
+# This is mostly a copy of config/host_java_library.mk
+LOCAL_MODULE := temp_layoutlib
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
+LOCAL_IS_HOST_MODULE := true
+LOCAL_BUILT_MODULE_STEM := classes.jar
+
+#######################################
+include $(BUILD_SYSTEM)/base_rules.mk
+#######################################
+
+$(LOCAL_BUILT_MODULE): $(built_core_dep) \
+ $(built_framework_dep) \
+ $(built_ext_dep) \
+ $(built_icudata_dep) \
+ $(built_icutzdata_dep) \
+ $(built_layoutlib_create_jar)
+ $(hide) echo "host layoutlib_create: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) rm -f $@
+ $(hide) ls -l $(built_framework_classes)
+ $(hide) java -ea -jar $(built_layoutlib_create_jar) \
+ --create-stub \
+ $@ \
+ $(built_core_classes) \
+ $(built_framework_classes) \
+ $(built_ext_classes) \
+ $(built_icudata_dep) \
+ $(built_icutzdata_dep) \
+ $(built_ext_data)
+ $(hide) ls -l $(built_framework_classes)
+
+
+my_link_type := java
+my_warn_types :=
+my_allowed_types :=
+my_link_deps :=
+my_2nd_arch_prefix :=
+my_common := COMMON
+include $(BUILD_SYSTEM)/link_type.mk
+
+#
+# Include the subdir makefiles.
+#
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
+endif
diff --git a/bridge/Android.bp b/bridge/Android.bp
deleted file mode 100644
index f0958dd..0000000
--- a/bridge/Android.bp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// Copyright (C) 2008 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.
-//
-
-java_library_host {
- name: "layoutlib",
-
- srcs: ["src/**/*.java"],
- java_version: "1.8",
- java_resource_dirs: ["resources"],
-
- libs: [
- "layoutlib_api-prebuilt",
- "tools-common-prebuilt",
- "guava",
- ],
-
- static_libs: [
- "temp_layoutlib",
- "ninepatch-prebuilt",
- "layoutlib-common",
- ],
-
- dist: {
- targets: ["layoutlib"],
- },
-}
-
-java_library_host {
- name: "layoutlib-no-framework",
-
- srcs: ["src/**/*.java"],
- java_version: "1.8",
- java_resource_dirs: ["resources"],
-
- libs: [
- "temp_layoutlib",
- "guava",
- ],
-
- static_libs: [
- "layoutlib_create",
- "layoutlib_api-prebuilt",
- "tools-common-prebuilt",
- "ninepatch-prebuilt",
- "layoutlib-common",
- ],
-
- dist: {
- targets: ["layoutlib"],
- },
-}
diff --git a/bridge/Android.mk b/bridge/Android.mk
new file mode 100644
index 0000000..9a317ab
--- /dev/null
+++ b/bridge/Android.mk
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2008 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_SRC_FILES := $(call all-java-files-under,src)
+LOCAL_JAVA_LANGUAGE_VERSION := 1.8
+LOCAL_JAVA_RESOURCE_DIRS := resources
+
+LOCAL_JAVA_LIBRARIES := \
+ layoutlib_api-prebuilt \
+ tools-common-prebuilt \
+ guava-prebuilt-host-jar
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ temp_layoutlib \
+ ninepatch-prebuilt \
+ layoutlib-common
+
+
+LOCAL_MODULE := layoutlib
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+$(call dist-for-goals, layoutlib, $(LOCAL_INSTALLED_MODULE))
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-java-files-under,src)
+LOCAL_JAVA_LANGUAGE_VERSION := 1.8
+LOCAL_JAVA_RESOURCE_DIRS := resources
+
+LOCAL_JAVA_LIBRARIES := temp_layoutlib \
+ guava-prebuilt-host-jar \
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ layoutlib_create \
+ layoutlib_api-prebuilt \
+ tools-common-prebuilt \
+ ninepatch-prebuilt \
+ layoutlib-common
+
+LOCAL_MODULE := layoutlib-no-framework
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+$(call dist-for-goals, layoutlib, $(LOCAL_INSTALLED_MODULE))
+
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/bridge/src/com/android/layoutlib/bridge/libcore/io/BridgeBufferIterator.java b/bridge/src/com/android/layoutlib/bridge/libcore/io/BridgeBufferIterator.java
index 6cbb85c..96cba78 100644
--- a/bridge/src/com/android/layoutlib/bridge/libcore/io/BridgeBufferIterator.java
+++ b/bridge/src/com/android/layoutlib/bridge/libcore/io/BridgeBufferIterator.java
@@ -75,13 +75,6 @@
}
@Override
- public void readLongArray(long[] dst, int dstOffset, int longCount) {
- while (--longCount >= 0) {
- dst[dstOffset++] = mByteBuffer.getLong();
- }
- }
-
- @Override
public short readShort() {
return mByteBuffer.getShort();
}
diff --git a/bridge/src/libcore/icu/ICU_Delegate.java b/bridge/src/libcore/icu/ICU_Delegate.java
index 2ba7f92..6e82e42 100644
--- a/bridge/src/libcore/icu/ICU_Delegate.java
+++ b/bridge/src/libcore/icu/ICU_Delegate.java
@@ -16,7 +16,6 @@
package libcore.icu;
-import android.icu.util.TimeZone;
import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
import android.icu.text.DateTimePatternGenerator;
@@ -259,6 +258,6 @@
@LayoutlibDelegate
/*package*/ static String getTZDataVersion() {
- return TimeZone.getTZDataVersion();
+ return ICU.getTZDataVersion();
}
}
diff --git a/bridge/tests/Android.bp b/bridge/tests/Android.bp
deleted file mode 100644
index 443d4d3..0000000
--- a/bridge/tests/Android.bp
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2011 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.
-
-java_test_host {
- name: "layoutlib-tests",
-
- // Only compile source java files in this lib.
- srcs: [
- "src/**/*.java",
- "res/testApp/MyApplication/src/main/myapplication.widgets/**/*.java",
- ],
- java_resource_dirs: ["res"],
-
- libs: [
- "layoutlib",
- "kxml2-2.3.0",
- "layoutlib_api-prebuilt",
- "tools-common-prebuilt",
- "sdk-common",
- "junit",
- "guava",
- "mockito",
- "objenesis",
- ],
-
- // Copy the jar to DIST_DIR for sdk builds
- dist: {
- targets: [
- "sdk",
- "win_sdk",
- ],
- },
-}
diff --git a/bridge/tests/Android.mk b/bridge/tests/Android.mk
new file mode 100644
index 0000000..d7c60cc
--- /dev/null
+++ b/bridge/tests/Android.mk
@@ -0,0 +1,44 @@
+# Copyright (C) 2011 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)
+
+# Only compile source java files in this lib.
+LOCAL_SRC_FILES := \
+ $(call all-java-files-under, src) \
+ $(call all-java-files-under, res/testApp/MyApplication/src/main/myapplication.widgets)
+LOCAL_JAVA_RESOURCE_DIRS := res
+
+LOCAL_MODULE := layoutlib-tests
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_JAVA_LIBRARIES := layoutlib \
+ kxml2-2.3.0 \
+ layoutlib_api-prebuilt \
+ tools-common-prebuilt \
+ sdk-common \
+ junit-host \
+ guava-prebuilt-host-jar \
+ mockito-host \
+ objenesis-host
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# Copy the jar to DIST_DIR for sdk builds
+$(call dist-for-goals, sdk win_sdk, $(LOCAL_INSTALLED_MODULE))
+
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/common/Android.bp b/common/Android.bp
deleted file mode 100644
index a256ae2..0000000
--- a/common/Android.bp
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// Copyright (C) 2008 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.
-//
-
-java_library_host {
- name: "layoutlib-common",
-
- srcs: ["src/**/*.java"],
-}
diff --git a/common/Android.mk b/common/Android.mk
new file mode 100644
index 0000000..5e22fdd
--- /dev/null
+++ b/common/Android.mk
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2008 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_SRC_FILES := $(call all-java-files-under,src)
+
+LOCAL_MODULE := layoutlib-common
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
diff --git a/create/Android.bp b/create/Android.bp
deleted file mode 100644
index 961456a..0000000
--- a/create/Android.bp
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// Copyright (C) 2008 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.
-//
-
-java_binary_host {
- name: "layoutlib_create",
-
- srcs: ["src/**/*.java"],
-
- main_class: "com.android.tools.layoutlib.create.Main",
- static_libs: [
- "asm-6.0",
- "guava",
- "layoutlib-common",
- ],
-}
diff --git a/create/Android.mk b/create/Android.mk
new file mode 100644
index 0000000..f13072e
--- /dev/null
+++ b/create/Android.mk
@@ -0,0 +1,33 @@
+#
+# Copyright (C) 2008 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_SRC_FILES := $(call all-java-files-under,src)
+
+LOCAL_JAR_MANIFEST := manifest.txt
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ asm-6.0 \
+ guava-prebuilt-host-jar \
+ layoutlib-common
+
+LOCAL_MODULE := layoutlib_create
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
diff --git a/create/tests/Android.bp b/create/tests/Android.bp
deleted file mode 100644
index d0d2ab7..0000000
--- a/create/tests/Android.bp
+++ /dev/null
@@ -1,39 +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.
-
-java_test_host {
- name: "layoutlib-create-tests",
-
- // Only compile source java files in this lib.
- srcs: ["com/**/*.java"],
-
- java_resource_dirs: [
- "data",
- "mock_data",
- ],
-
- libs: [
- "layoutlib_create",
- "junit",
- ],
- static_libs: ["asm-6.0"],
-
- // Copy the jar to DIST_DIR for sdk builds
- dist: {
- targets: [
- "sdk",
- "win_sdk",
- ],
- },
-}
diff --git a/create/tests/Android.mk b/create/tests/Android.mk
new file mode 100644
index 0000000..307ca33
--- /dev/null
+++ b/create/tests/Android.mk
@@ -0,0 +1,35 @@
+# 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.
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# Only compile source java files in this lib.
+LOCAL_SRC_FILES := $(call all-java-files-under, com)
+
+LOCAL_JAVA_RESOURCE_DIRS := data mock_data
+
+LOCAL_MODULE := layoutlib-create-tests
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_JAVA_LIBRARIES := layoutlib_create junit-host
+LOCAL_STATIC_JAVA_LIBRARIES := asm-6.0
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# Copy the jar to DIST_DIR for sdk builds
+$(call dist-for-goals, sdk win_sdk, $(LOCAL_INSTALLED_MODULE))
+
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/legacy/Android.bp b/legacy/Android.bp
deleted file mode 100644
index d9a19de..0000000
--- a/legacy/Android.bp
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Copyright (C) 2008 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.
-//
-
-java_library_host {
- name: "layoutlib-legacy",
-
- srcs: ["src/**/*.java"],
-
- libs: ["layoutlib_api-prebuilt"],
-}
diff --git a/legacy/Android.mk b/legacy/Android.mk
new file mode 100644
index 0000000..5855f89
--- /dev/null
+++ b/legacy/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2008 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_SRC_FILES := $(call all-java-files-under,src)
+
+LOCAL_JAVA_LIBRARIES := \
+ layoutlib_api-prebuilt
+
+LOCAL_MODULE := layoutlib-legacy
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
+