merge in lmp-release history after reset to 84c26b694978eb6b9ee9400d15283707ea9b3eb9
diff --git a/.gitignore b/.gitignore
index 0d20b64..c9b568f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 *.pyc
+*.swp
diff --git a/core/Makefile b/core/Makefile
index fadec15..36d53e1 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -243,6 +243,22 @@
 build_desc :=
 
 # -----------------------------------------------------------------
+# vendor build.prop
+#
+# For verifying that the vendor build is what we thing it is
+ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
+INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop
+ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_VENDOR_BUILD_PROP_TARGET)
+$(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(INSTALLED_BUILD_PROP_TARGET)
+	@echo Target vendor buildinfo: $@
+	@mkdir -p $(dir $@)
+	$(hide) echo > $@
+	$(hide) echo ro.vendor.build.date=`date`>>$@
+	$(hide) echo ro.vendor.build.date.utc=`date +%s`>>$@
+	$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT)">>$@
+endif
+
+# -----------------------------------------------------------------
 # sdk-build.prop
 #
 # There are certain things in build.prop that we don't want to
@@ -1601,7 +1617,6 @@
 ATREE_FILES := \
 	$(ALL_PREBUILT) \
 	$(ALL_COPIED_HEADERS) \
-	$(ALL_GENERATED_SOURCES) \
 	$(ALL_DEFAULT_INSTALLED_MODULES) \
 	$(INSTALLED_RAMDISK_TARGET) \
 	$(ALL_DOCS) \
diff --git a/core/base_rules.mk b/core/base_rules.mk
index f40eae7..7663ee2 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -176,7 +176,6 @@
   built_module_path := $(intermediates)
 endif
 LOCAL_BUILT_MODULE := $(built_module_path)/$(my_built_module_stem)
-built_module_path :=
 
 ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
   # Apk and its attachments reside in its own subdir.
diff --git a/core/build_id.mk b/core/build_id.mk
index 5121d74..00a691f 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,4 @@
 # (like "CRB01").  It must be a single word, and is
 # capitalized by convention.
 
-export BUILD_ID=LRW22B
+export BUILD_ID=LMP
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 4fd2888..f23c4a6 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -23,6 +23,7 @@
 LOCAL_OVERRIDES_PACKAGES:=
 LOCAL_EXPORT_PACKAGE_RESOURCES:=
 LOCAL_MANIFEST_PACKAGE_NAME:=
+LOCAL_PACKAGE_SPLITS:=
 LOCAL_REQUIRED_MODULES:=
 LOCAL_ACP_UNAVAILABLE:=
 LOCAL_MODULE_TAGS:=
diff --git a/core/definitions.mk b/core/definitions.mk
index 6656591..e433b69 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1805,6 +1805,18 @@
 $(hide) mv $@.aligned $@
 endef
 
+# Build a split APK
+# The splti APKs are already built in the same command building the base APK.
+# We only need to do zipalign and signing etc.
+# This macro must be called with $(eval).
+# $(1): the path to the built split APK.
+# $(2): the path to the base APK.
+define build-split-apk
+$(1) : $(2)
+	$$(sign-package)
+	$$(align-package)
+endef
+
 define install-dex-debug
 $(hide) if [ -f "$(PRIVATE_INTERMEDIATES_DIR)/classes.dex" ]; then \
 	    mkdir -p $(TOP)/dalvik/DEBUG-FILES; \
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 8fc0c67..2d9c518 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -20,12 +20,7 @@
 
 # start of image reserved address space
 LIBART_IMG_HOST_BASE_ADDRESS   := 0x60000000
-
-ifeq ($(TARGET_ARCH),mips)
-LIBART_IMG_TARGET_BASE_ADDRESS := 0x30000000
-else
 LIBART_IMG_TARGET_BASE_ADDRESS := 0x70000000
-endif
 
 define get-product-default-property
 $(strip $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))))
@@ -36,6 +31,17 @@
 DEX2OAT_XMS := $(call get-product-default-property,dalvik.vm.dex2oat-Xms)
 DEX2OAT_XMX := $(call get-product-default-property,dalvik.vm.dex2oat-Xmx)
 
+ifeq ($(TARGET_ARCH),mips)
+# MIPS specific overrides.
+# For MIPS the ART image is loaded at a lower address. This causes issues
+# with the image overlapping with memory on the host cross-compiling and
+# building the image. We therefore limit the Xmx value. This isn't done
+# via a property as we want the larger Xmx value if we're running on a
+# MIPS device.
+LIBART_IMG_TARGET_BASE_ADDRESS := 0x30000000
+DEX2OAT_XMX := 128m
+endif
+
 ########################################################################
 # The full system boot classpath
 
diff --git a/core/package_internal.mk b/core/package_internal.mk
index c76792d..a5b1142 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -68,6 +68,10 @@
 LOCAL_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) -z
 endif
 
+ifdef LOCAL_PACKAGE_SPLITS
+LOCAL_AAPT_FLAGS += $(addprefix --split ,$(LOCAL_PACKAGE_SPLITS))
+endif
+
 ifeq (,$(LOCAL_ASSET_DIR))
 LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets
 endif
@@ -403,6 +407,32 @@
 	$(hide) rm $@.input
 endif
 
+###############################
+## APK splits
+ifdef LOCAL_PACKAGE_SPLITS
+built_apk_splits := $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(built_module_path)/package_$(s).apk)
+installed_apk_splits := $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
+
+$(built_apk_splits): PRIVATE_PRIVATE_KEY := $(private_key)
+$(built_apk_splits): PRIVATE_CERTIFICATE := $(certificate)
+# The splits should have been built in the same command building the base apk.
+# This rule just establishes the dependency and make sure the splits are up to date.
+$(foreach s,$(built_apk_splits),\
+  $(eval $(call build-split-apk,$(s),$(LOCAL_BUILT_MODULE))))
+
+# Rules to install the splits
+$(foreach s,$(LOCAL_PACKAGE_SPLITS),\
+  $(eval $(call copy-one-file,$(built_module_path)/package_$(s).apk,$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)))
+
+# Register the additional built and installed files.
+ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
+ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
+  $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(built_module_path)/package_$(s).apk:$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
+
+# Make sure to install the splits when you run "make <module_name>".
+$(my_register_name): $(installed_apk_splits)
+endif # LOCAL_PACKAGE_SPLITS
+
 # Save information about this package
 PACKAGES.$(LOCAL_PACKAGE_NAME).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
 PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_FILES := $(all_resources)
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index 58bb235..82094b9 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -61,6 +61,7 @@
 
 
 CTS_TEST_JAR_LIST := \
+        cts-junit \
 	CtsJdwp
 
 # Depend on the full package paths rather than the phony targets to avoid