merge in jb-mr1-factory-release history after reset to jb-mr1-dev
diff --git a/core/base_rules.mk b/core/base_rules.mk
index bd92b09..186c4db 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -449,7 +449,6 @@
 
 # Propagate local configuration options to this target.
 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_PATH:=$(LOCAL_PATH)
-$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_POST_PROCESS_COMMAND:= $(LOCAL_POST_PROCESS_COMMAND)
 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_AAPT_FLAGS:= $(LOCAL_AAPT_FLAGS)
 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_JAVA_LIBRARIES:= $(LOCAL_JAVA_LIBRARIES)
 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MANIFEST_PACKAGE_NAME:= $(LOCAL_MANIFEST_PACKAGE_NAME)
diff --git a/core/build_id.mk b/core/build_id.mk
index e9a987b..40bb35d 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -1,4 +1,3 @@
-
 #
 # Copyright (C) 2008 The Android Open Source Project
 #
@@ -14,9 +13,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+
+#
+# Defines branch-specific values.
+#
+
 # BUILD_ID is usually used to specify the branch name
 # (like "MAIN") or a branch name and a release candidate
-# (like "CRB01").  It must be a single word, and is
+# (like "TC1-RC5").  It must be a single word, and is
 # capitalized by convention.
+#
+BUILD_ID := MASTER
 
-export BUILD_ID=JVP11
+# DISPLAY_BUILD_NUMBER should only be set for development branches,
+# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
+# a more descriptive BUILD_ID_DISPLAY, otherwise BUILD_ID_DISPLAY
+# is the same as BUILD_ID
+DISPLAY_BUILD_NUMBER := true
diff --git a/core/cleanspec.mk b/core/cleanspec.mk
index a3eb7cd..444ff98 100644
--- a/core/cleanspec.mk
+++ b/core/cleanspec.mk
@@ -63,8 +63,27 @@
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
 # ************************************************
 
+# Get the path of the top of the tree.
+# for example:
+# /home/bob/master/framework/base => /home/bob/master
+# See function gettop in build/envsetup.sh.
+define get-top-dir
+$(if $(1),$(if $(wildcard $(1)/build/core/envsetup.mk),$(1),$(strip \
+  $(call get-top-dir,$(patsubst %/,%,$(dir $(1)))))))
+endef
+
 ifneq ($(ONE_SHOT_MAKEFILE),)
-cs_subdirs := $(dir $(ONE_SHOT_MAKEFILE))
+cs_subdirs := $(patsubst %/,%,$(dir $(ONE_SHOT_MAKEFILE)))
+abs_cs_subdirs := $(filter /%,$(cs_subdirs))
+ifneq ($(abs_cs_subdirs),)
+# Convert absolute path to relative path, e.g. when using mm.
+abs_top_path := $(call get-top-dir,$(word 1,$(abs_cs_subdirs)))
+cs_subdirs := $(filter-out /%,$(cs_subdirs)) \
+  $(patsubst $(abs_top_path)/%,%,$(abs_cs_subdirs))
+
+abs_top_path :=
+abs_cs_subdirs :=
+endif
 else
 cs_subdirs := .
 endif
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 343345f..5d55534 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -83,7 +83,6 @@
 LOCAL_ENABLE_APROF_JNI:=
 LOCAL_COMPRESS_MODULE_SYMBOLS:=
 LOCAL_STRIP_MODULE:=
-LOCAL_POST_PROCESS_COMMAND:=true
 LOCAL_JNI_SHARED_LIBRARIES:=
 LOCAL_JNI_SHARED_LIBRARIES_ABI:=
 LOCAL_JAR_MANIFEST:=
diff --git a/core/definitions.mk b/core/definitions.mk
index 7336c74..06db960 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -269,7 +269,7 @@
 define all-renderscript-files-under
 $(patsubst ./%,%, \
   $(shell cd $(LOCAL_PATH) ; \
-          find $(1) -name "*.rs" -and -not -name ".*") \
+          find $(1) \( -name "*.rs" -or -name "*.fs" \) -and -not -name ".*") \
   )
 endef
 
diff --git a/core/host_executable.mk b/core/host_executable.mk
index 4d90e6d..93d3f10 100644
--- a/core/host_executable.mk
+++ b/core/host_executable.mk
@@ -17,4 +17,3 @@
 
 $(LOCAL_BUILT_MODULE): $(all_objects) $(all_libraries)
 	$(transform-host-o-to-executable)
-	$(PRIVATE_POST_PROCESS_COMMAND)
diff --git a/core/java.mk b/core/java.mk
index 66f9a02..99e67f4 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -133,8 +133,9 @@
 
 ###############################################################
 ## .rs files: RenderScript sources to .java files and .bc files
+## .fs files: Filterscript sources to .java files and .bc files
 ###############################################################
-renderscript_sources := $(filter %.rs,$(LOCAL_SRC_FILES))
+renderscript_sources := $(filter %.rs %.fs,$(LOCAL_SRC_FILES))
 # Because names of the java files from RenderScript are unknown until the
 # .rs file(s) are compiled, we have to depend on a timestamp file.
 RenderScript_file_stamp :=
@@ -196,7 +197,7 @@
 
 # include the dependency files (.d) generated by llvm-rs-cc.
 renderscript_generated_dep_files := $(addprefix $(renderscript_intermediate)/, \
-    $(patsubst %.rs,%.d, $(notdir $(renderscript_sources))))
+    $(patsubst %.fs,%.d, $(patsubst %.rs,%.d, $(notdir $(renderscript_sources)))))
 -include $(renderscript_generated_dep_files)
 
 LOCAL_INTERMEDIATE_TARGETS += $(RenderScript_file_stamp)
diff --git a/envsetup.sh b/envsetup.sh
index 3694755..c758fcc 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -616,7 +616,7 @@
     local HERE=$PWD
     T=
     while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
-        T=$PWD
+        T=`PWD= /bin/pwd`
         if [ -f "$T/Android.mk" ]; then
             echo $T/Android.mk
             cd $HERE > /dev/null
diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css
index 09e6450..f3a014d 100644
--- a/tools/droiddoc/templates-sdk/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk/assets/css/default.css
@@ -3369,7 +3369,7 @@
 }
 
 #header-wrap.quicknav {
-  height:170px;
+  height:196px;
   
 }
 
diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs
index d98af85..025d076 100644
--- a/tools/droiddoc/templates-sdk/components/masthead.cs
+++ b/tools/droiddoc/templates-sdk/components/masthead.cs
@@ -119,10 +119,12 @@
                 <ul>
                     <li class="design">
                       <ul>
+                        <li><a href="<?cs var:toroot ?>design/index.html">Get Started</a></li>
                         <li><a href="<?cs var:toroot ?>design/style/index.html">Style</a></li>
                         <li><a href="<?cs var:toroot ?>design/patterns/index.html">Patterns</a></li>
                         <li><a href="<?cs var:toroot ?>design/building-blocks/index.html">Building Blocks</a></li>
                         <li><a href="<?cs var:toroot ?>design/downloads/index.html">Downloads</a></li>
+                        <li><a href="<?cs var:toroot ?>design/videos/index.html">Videos</a></li>
                       </ul>
                     </li>
                     <li class="develop">
@@ -169,9 +171,9 @@
                         <li><a href="<?cs var:toroot ?>distribute/index.html">Google Play</a></li>
                         <li><a href="<?cs var:toroot ?>distribute/googleplay/publish/index.html">Publishing</a></li>
                         <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/index.html">Promoting</a></li>
-                        <!--<li><a href="<?cs var:toroot ?>distribute/googleplay/strategies/index.html">Strategies</a></li> -->
-                        <li><a href="<?cs var:toroot ?>distribute/open.html">Open
-Distribution</a></li> 
+                        <li><a href="<?cs var:toroot ?>distribute/googleplay/quality/index.html">App Quality</a></li>
+                        <li><a href="<?cs var:toroot ?>distribute/googleplay/spotlight/index.html">Spotlight</a></li>
+                        <li><a href="<?cs var:toroot ?>distribute/open.html">Open Distribution</a></li>
                       </ul>
                     </li>
                 </ul>