merge in klp-release history after reset to klp-dev
diff --git a/core/Makefile b/core/Makefile
index da2454a..d83578b 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -507,6 +507,7 @@
 tools_notice_file_txt := $(HOST_OUT_INTERMEDIATES)/NOTICE.txt
 tools_notice_file_html := $(HOST_OUT_INTERMEDIATES)/NOTICE.html
 
+ifndef TARGET_BUILD_APPS
 kernel_notice_file := $(TARGET_OUT_NOTICE_FILES)/src/kernel.txt
 pdk_fusion_notice_files := $(filter $(TARGET_OUT_NOTICE_FILES)/%, $(ALL_PDK_FUSION_FILES))
 
@@ -539,6 +540,7 @@
 ifeq ($(ONE_SHOT_MAKEFILE),)
 ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_gz)
 endif
+endif  # TARGET_BUILD_APPS
 
 # The kernel isn't really a module, so to get its module file in there, we
 # make the target NOTICE files depend on this particular file too, which will
diff --git a/core/build_id.mk b/core/build_id.mk
index f6b5236..a3b9db6 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,6 @@
 # (like "CRB01").  It must be a single word, and is
 # capitalized by convention.
 
-export BUILD_ID=KRS57B
+BUILD_ID := KLP
+
+DISPLAY_BUILD_NUMBER := true
diff --git a/core/main.mk b/core/main.mk
index b8a8191..0b43efe 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -836,6 +836,15 @@
 
 droid: apps_only
 
+# Combine the NOTICE files for a apps_only build
+$(eval $(call combine-notice-files, \
+    $(target_notice_file_txt), \
+    $(target_notice_file_html), \
+    "Notices for files for apps:", \
+    $(TARGET_OUT_NOTICE_FILES), \
+    $(apps_only_installed_files)))
+
+
 else # TARGET_BUILD_APPS
   $(call dist-for-goals, droidcore, \
     $(INTERNAL_UPDATE_PACKAGE_TARGET) \
diff --git a/core/notice_files.mk b/core/notice_files.mk
index 7e61c1e..5af0113 100644
--- a/core/notice_files.mk
+++ b/core/notice_files.mk
@@ -73,6 +73,19 @@
 $(LOCAL_INSTALLED_MODULE): | $(installed_notice_file)
 endif
 
+# To facilitate collecting NOTICE files for apps_only build,
+# we install the NOTICE file even if a module gets built but not installed,
+# because shared jni libraries won't be installed to the system image.
+ifdef TARGET_BUILD_APPS
+# for static Java libraries, we don't need to even build LOCAL_BUILT_MODULE,
+# but just javalib.jar in the common intermediate dir.
+ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
+$(intermediates.COMMON)/javalib.jar : | $(installed_notice_file)
+else
+$(LOCAL_BUILT_MODULE): | $(installed_notice_file)
+endif  # JAVA_LIBRARIES
+endif  # TARGET_BUILD_APPS
+
 else
 # NOTICE file does not exist
 installed_notice_file :=
diff --git a/core/product.mk b/core/product.mk
index 35b5b84..a2f4abc 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -238,9 +238,6 @@
 	BOARD_KERNEL_CMDLINE \
 	BOARD_KERNEL_BASE \
 	BOARD_HAVE_BLUETOOTH \
-	BOARD_HAVE_BLUETOOTH_BCM \
-	BOARD_HAVE_BLUETOOTH_QCOM \
-	BOARD_VENDOR_QCOM_AMSS_VERSION \
 	BOARD_VENDOR_USE_AKMD \
 	BOARD_EGL_CFG \
 	BOARD_BOOTIMAGE_PARTITION_SIZE \
@@ -251,8 +248,6 @@
 	BOARD_CACHEIMAGE_PARTITION_SIZE \
 	BOARD_FLASH_BLOCK_SIZE \
 	BOARD_SYSTEMIMAGE_PARTITION_SIZE \
-	BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE \
-	BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION \
 	BOARD_INSTALLER_CMDLINE \
 
 
diff --git a/tools/droiddoc/templates-sdk/sample.cs b/tools/droiddoc/templates-sdk/sample.cs
index cd0659e..ea36fa3 100644
--- a/tools/droiddoc/templates-sdk/sample.cs
+++ b/tools/droiddoc/templates-sdk/sample.cs
@@ -10,6 +10,21 @@
 ?>class="col-13" id="doc-col"<?cs else 
 ?>class="col-12" id="doc-col"<?cs /if ?> >
 
+<!-- start breadcrumb block -->
+<div id="api-info-block">
+<div class="sum-details-links">
+
+<!-- related links -->
+<a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/index.html">Overview</a>
+&#124; <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/project.html">Project</a>
+&#124; <a href="<?cs var:toroot ?>downloads/samples/<?cs var:projectDir ?>.zip">Download</a>
+
+</div><!-- end sum-details-links -->
+<div class="api-level">
+  Other info</a>
+</div>
+</div><!-- end breadcurmb block -->
+
 <h1 itemprop="name"><?cs var:page.title ?></h1>
 
 <?cs # THIS IS THE MAIN DOC CONTENT ?>
@@ -27,6 +42,12 @@
 <pre id="codesample-line-numbers" class="no-pretty-print hidden"></pre>
 <pre id="codesample-block"><?cs var:fileContents ?></pre>
 </div>
+
+<h3 id="file-location" style="clear:left">Source file location</h3>
+<p>The file containing the source code shown below is located in the corresponding directory in 
+<code>&lt;sdk&gt;/samples/android-&lt;version&gt;/...</code></p>
+
+
 <!-- end file contents -->
 <script type="text/javascript">
   initCodeLineNumbers();
diff --git a/tools/droiddoc/templates-sdk/sampleindex.cs b/tools/droiddoc/templates-sdk/sampleindex.cs
index 5fff207..9d25e40 100644
--- a/tools/droiddoc/templates-sdk/sampleindex.cs
+++ b/tools/droiddoc/templates-sdk/sampleindex.cs
@@ -10,7 +10,25 @@
 ?>class="col-13" id="doc-col"<?cs else 
 ?>class="col-12" id="doc-col"<?cs /if ?> >
 
-<h1 itemprop="name"><?cs var:projectTitle ?></h1>
+<!-- start breadcrumb block -->
+<div id="api-info-block">
+<div class="sum-details-links">
+
+<!-- related links -->
+<?cs if:projectStructure ?>
+<a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/index.html">Overview</a>
+&#124; Project<?cs else ?>Overview
+&#124; <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/project.html">Project</a>
+<?cs /if ?>
+&#124; <a href="<?cs var:toroot ?>downloads/samples/<?cs var:projectDir ?>.zip">Download</a>
+
+</div><!-- end sum-details-links -->
+<div class="api-level">
+  Other info</a>
+</div>
+</div><!-- end breadcurmb block -->
+
+<h1 itemprop="name"><?cs var:projectDir ?></h1>
   
 <div id="jd-content">
 <?cs def:display_files(files) ?>
@@ -42,7 +60,7 @@
 <?cs if:android.whichdoc == "online" ?>
   <?cs # If this is the online docs, build the src code navigation links ?>
 
-  <?cs if:page.title == "Project Structure" ?>
+  <?cs if:projectStructure ?>
 
     <?cs call:display_files(Files) ?>
 
@@ -55,7 +73,7 @@
          # <p>Decide what to do with this ...</p>
          # <?cs call:display_files(Files) ?>
 
-  <?cs /if ?> <?cs # end if project structure ?>
+  <?cs /if ?> <?cs # end if projectStructure ?>
 
 <?cs else ?><?cs
   # else, this means it's offline docs,