Merge "Switch Indic fonts to Noto" into jb-mr2-dev
diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk
index 63cbf63..1d17f77 100644
--- a/core/cleanbuild.mk
+++ b/core/cleanbuild.mk
@@ -193,8 +193,9 @@
 	$(PRODUCT_OUT)/obj/JAVA_LIBRARIES \
 	$(PRODUCT_OUT)/obj/FAKE \
 	$(PRODUCT_OUT)/obj/EXECUTABLES/adbd_intermediates \
-	$(PRODUCT_OUT)/obj/EXECUTABLES/init_intermediates
-
+	$(PRODUCT_OUT)/obj/EXECUTABLES/init_intermediates \
+	$(PRODUCT_OUT)/obj/ETC/mac_permissions.xml_intermediates \
+	$(PRODUCT_OUT)/obj/ETC/sepolicy_intermediates
 
 # The files/dirs to delete during a dataclean, which removes any files
 # in the staging and emulator data partitions.
diff --git a/core/definitions.mk b/core/definitions.mk
index 2cf5283..7bee582 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -833,7 +833,7 @@
 	$(RS_PREBUILT_COMPILER_RT) \
 	-o $@ -L prebuilts/gcc/ \
 	-L $(TARGET_OUT_INTERMEDIATE_LIBRARIES) $(RS_PREBUILT_LIBPATH) \
-	-lRSSupport -lm
+	-lRSSupport -lm -lc
 endef
 
 ###########################################################
diff --git a/core/host_java_library.mk b/core/host_java_library.mk
index d6a688f..cda6e10 100644
--- a/core/host_java_library.mk
+++ b/core/host_java_library.mk
@@ -50,6 +50,8 @@
 
 include $(BUILD_SYSTEM)/base_rules.mk
 
+$(full_classes_compiled_jar): PRIVATE_JAVAC_DEBUG_FLAGS := -g
+
 java_alternative_checked_module :=
 
 # The layers file allows you to enforce a layering between java packages.
diff --git a/core/java.mk b/core/java.mk
index da670f9..7c8c894f 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -214,7 +214,7 @@
 
 $(rs_compatibility_jni_libs): $(RenderScript_file_stamp) $(RS_PREBUILT_CLCORE) \
     $(rs_support_lib) $(rs_jni_lib) $(rs_compiler_rt)
-$(rs_compatibility_jni_libs): | $(BCC_COMPAT)
+$(rs_compatibility_jni_libs): $(BCC_COMPAT)
 $(rs_compatibility_jni_libs): PRIVATE_CXX := $(TARGET_CXX)
 $(rs_compatibility_jni_libs): $(renderscript_intermediate)/librs.%.so: \
     $(renderscript_intermediate.COMMON)/res/raw/%.bc
diff --git a/core/java_library.mk b/core/java_library.mk
index d65a3ca..67c1bcb 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -31,6 +31,10 @@
 common_javalib.jar := $(intermediates.COMMON)/$(LOCAL_BUILT_MODULE_STEM)
 LOCAL_INTERMEDIATE_TARGETS += $(common_javalib.jar)
 
+ifeq ($(LOCAL_PROGUARD_ENABLED),disabled)
+  LOCAL_PROGUARD_ENABLED :=
+endif
+
 ifneq (true,$(WITH_DEXPREOPT))
 LOCAL_DEX_PREOPT :=
 else
@@ -62,7 +66,12 @@
 
 ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
 # No dex; all we want are the .class files with resources.
-$(common_javalib.jar) : $(full_classes_jar) $(java_resource_sources)
+$(common_javalib.jar) : $(java_resource_sources)
+ifdef LOCAL_PROGUARD_ENABLED
+$(common_javalib.jar) : $(full_classes_proguard_jar)
+else
+$(common_javalib.jar) : $(full_classes_jar)
+endif
 	@echo "target Static Jar: $(PRIVATE_MODULE) ($@)"
 	$(copy-file-to-target)
 ifneq ($(extra_jar_args),)
diff --git a/core/pdk_config.mk b/core/pdk_config.mk
index afa5b74..41a82d4 100644
--- a/core/pdk_config.mk
+++ b/core/pdk_config.mk
@@ -18,12 +18,14 @@
 
 # if PDK_FUSION_PLATFORM_ZIP is specified, do not override.
 ifndef PDK_FUSION_PLATFORM_ZIP
-_pdk_fusion_default_platform_zip := vendor/pdk/$(TARGET_DEVICE)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip
-ifneq (,$(wildcard $(_pdk_fusion_default_platform_zip)))
-$(info $(_pdk_fusion_default_platform_zip) found, do a PDK fusion build.)
-PDK_FUSION_PLATFORM_ZIP := $(_pdk_fusion_default_platform_zip)
+_pdk_fusion_default_platform_zip = $(wildcard \
+vendor/pdk/$(TARGET_DEVICE)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip \
+vendor/pdk/$(TARGET_DEVICE)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform/platform.zip)
+ifneq (,$(_pdk_fusion_default_platform_zip))
+PDK_FUSION_PLATFORM_ZIP := $(word 1, $(_pdk_fusion_default_platform_zip))
 TARGET_BUILD_PDK := true
-endif
+$(info $(PDK_FUSION_PLATFORM_ZIP) found, do a PDK fusion build.)
+endif # _pdk_fusion_default_platform_zip
 endif # !PDK_FUSION_PLATFORM_ZIP
 
 ifneq (,$(filter pdk fusion, $(MAKECMDGOALS)))
diff --git a/core/static_java_library.mk b/core/static_java_library.mk
index eaa74aa..c3c5c86 100644
--- a/core/static_java_library.mk
+++ b/core/static_java_library.mk
@@ -21,6 +21,7 @@
 
 LOCAL_UNINSTALLABLE_MODULE := true
 LOCAL_IS_STATIC_JAVA_LIBRARY := true
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 
 # Hack to build static Java library with Android resource
 # See bug 5714516
@@ -46,6 +47,15 @@
 ifeq (none,$(LOCAL_JAR_EXCLUDE_FILES))
 LOCAL_JAR_EXCLUDE_FILES :=
 endif
+
+proguard_options_file :=
+
+intermediates.COMMON := $(call local-intermediates-dir,COMMON)
+ifneq ($(LOCAL_PROGUARD_ENABLED),custom)
+  proguard_options_file := $(intermediates.COMMON)/proguard_options
+endif
+LOCAL_PROGUARD_FLAGS := $(addprefix -include ,$(proguard_options_file)) $(LOCAL_PROGUARD_FLAGS)
+
 endif  # all_resources
 endif  # LOCAL_RESOURCE_DIR
 
@@ -55,9 +65,13 @@
 R_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/R.stamp
 
 ifeq ($(strip $(LOCAL_MANIFEST_FILE)),)
-LOCAL_MANIFEST_FILE := AndroidManifest.xml
+  LOCAL_MANIFEST_FILE := AndroidManifest.xml
 endif
-full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
+ifdef LOCAL_FULL_MANIFEST_FILE
+  full_android_manifest := $(LOCAL_FULL_MANIFEST_FILE)
+else
+  full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
+endif
 
 LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION))
 ifeq ($(LOCAL_SDK_RES_VERSION),)
@@ -94,7 +108,7 @@
 $(R_file_stamp): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
 endif
 $(R_file_stamp): PRIVATE_ASSET_DIR :=
-$(R_file_stamp): PRIVATE_PROGUARD_OPTIONS_FILE :=
+$(R_file_stamp): PRIVATE_PROGUARD_OPTIONS_FILE := $(proguard_options_file)
 $(R_file_stamp): PRIVATE_MANIFEST_PACKAGE_NAME :=
 $(R_file_stamp): PRIVATE_MANIFEST_INSTRUMENTATION_FOR :=
 
diff --git a/core/tasks/factory_bundle.mk b/core/tasks/factory_bundle.mk
index 5c5adc3..054a52a 100644
--- a/core/tasks/factory_bundle.mk
+++ b/core/tasks/factory_bundle.mk
@@ -16,6 +16,9 @@
 
 ifeq (,$(ONE_SHOT_MAKEFILE))
 ifneq ($(TARGET_BUILD_PDK),true)
+  TARGET_BUILD_FACTORY=true
+endif
+ifeq ($(TARGET_BUILD_FACTORY),true)
 
 # PRODUCT_FACTORY_RAMDISK_MODULES consists of "<module_name>:<install_path>[:<install_path>...]" tuples.
 # <install_path> is relative to the staging directory for the bundle.
diff --git a/core/tasks/factory_ramdisk.mk b/core/tasks/factory_ramdisk.mk
index 579fd6a..00fcdde 100644
--- a/core/tasks/factory_ramdisk.mk
+++ b/core/tasks/factory_ramdisk.mk
@@ -16,6 +16,9 @@
 
 ifeq (,$(ONE_SHOT_MAKEFILE))
 ifneq ($(TARGET_BUILD_PDK),true)
+  TARGET_BUILD_FACTORY=true
+endif
+ifeq ($(TARGET_BUILD_FACTORY),true)
 
 # PRODUCT_FACTORY_RAMDISK_MODULES consists of "<module_name>:<install_path>[:<install_path>...]" tuples.
 # <install_path> is relative to TARGET_FACTORY_RAMDISK_OUT.
diff --git a/envsetup.sh b/envsetup.sh
index 542d7b2..61bdc3d 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -426,10 +426,10 @@
 }
 
 # add the default one here
-add_lunch_combo full-eng
-add_lunch_combo full_x86-eng
+add_lunch_combo aosp_arm-eng
+add_lunch_combo aosp_x86-eng
+add_lunch_combo aosp_mips-eng
 add_lunch_combo vbox_x86-eng
-add_lunch_combo full_mips-eng
 
 function print_lunch_menu()
 {
@@ -458,7 +458,7 @@
         answer=$1
     else
         print_lunch_menu
-        echo -n "Which would you like? [full-eng] "
+        echo -n "Which would you like? [aosp_arm-eng] "
         read answer
     fi
 
@@ -466,7 +466,7 @@
 
     if [ -z "$answer" ]
     then
-        selection=full-eng
+        selection=aosp_arm-eng
     elif (echo -n $answer | grep -q -e "^[0-9][0-9]*$")
     then
         if [ $answer -le ${#LUNCH_MENU_CHOICES[@]} ]
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index b0e22e1..a72d2f3 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -34,9 +34,12 @@
 # Unbundled apps will be built with the most generic product config.
 ifneq ($(TARGET_BUILD_APPS),)
 PRODUCT_MAKEFILES := \
+    $(LOCAL_DIR)/aosp_arm.mk \
     $(LOCAL_DIR)/full.mk \
     $(LOCAL_DIR)/generic_armv5.mk \
+    $(LOCAL_DIR)/aosp_x86.mk \
     $(LOCAL_DIR)/full_x86.mk \
+    $(LOCAL_DIR)/aosp_mips.mk \
     $(LOCAL_DIR)/full_mips.mk
 else
 PRODUCT_MAKEFILES := \
@@ -44,8 +47,11 @@
     $(LOCAL_DIR)/generic.mk \
     $(LOCAL_DIR)/generic_x86.mk \
     $(LOCAL_DIR)/generic_mips.mk \
+    $(LOCAL_DIR)/aosp_arm.mk \
     $(LOCAL_DIR)/full.mk \
+    $(LOCAL_DIR)/aosp_x86.mk \
     $(LOCAL_DIR)/full_x86.mk \
+    $(LOCAL_DIR)/aosp_mips.mk \
     $(LOCAL_DIR)/full_mips.mk \
     $(LOCAL_DIR)/vbox_x86.mk \
     $(LOCAL_DIR)/sdk.mk \
diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk
new file mode 100644
index 0000000..86b715c
--- /dev/null
+++ b/target/product/aosp_arm.mk
@@ -0,0 +1,18 @@
+#
+# Copyright 2013 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.
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full.mk)
+
+PRODUCT_NAME := aosp_arm
diff --git a/target/product/aosp_base.mk b/target/product/aosp_base.mk
new file mode 100644
index 0000000..075c1d3
--- /dev/null
+++ b/target/product/aosp_base.mk
@@ -0,0 +1,16 @@
+#
+# Copyright 2013 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.
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
diff --git a/target/product/aosp_base_telephony.mk b/target/product/aosp_base_telephony.mk
new file mode 100644
index 0000000..f326a00
--- /dev/null
+++ b/target/product/aosp_base_telephony.mk
@@ -0,0 +1,16 @@
+#
+# Copyright 2013 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.
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
diff --git a/target/product/aosp_mips.mk b/target/product/aosp_mips.mk
new file mode 100644
index 0000000..ceeb433
--- /dev/null
+++ b/target/product/aosp_mips.mk
@@ -0,0 +1,18 @@
+#
+# Copyright 2013 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.
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_mips.mk)
+
+PRODUCT_NAME := aosp_mips
diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk
new file mode 100644
index 0000000..3e9b018
--- /dev/null
+++ b/target/product/aosp_x86.mk
@@ -0,0 +1,18 @@
+#
+# Copyright 2013 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.
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_x86.mk)
+
+PRODUCT_NAME := aosp_x86
diff --git a/target/product/full.mk b/target/product/full.mk
index a4075d4..b66ae92 100644
--- a/target/product/full.mk
+++ b/target/product/full.mk
@@ -19,7 +19,7 @@
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/board/generic/device.mk)
 
 include $(SRC_TARGET_DIR)/product/emulator.mk
@@ -28,4 +28,4 @@
 PRODUCT_NAME := full
 PRODUCT_DEVICE := generic
 PRODUCT_BRAND := Android
-PRODUCT_MODEL := Full Android on Emulator
+PRODUCT_MODEL := AOSP on ARM Emulator
diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk
index 5899c8c..f98e9a2 100644
--- a/target/product/full_base_telephony.mk
+++ b/target/product/full_base_telephony.mk
@@ -29,5 +29,5 @@
 PRODUCT_COPY_FILES := \
     device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
diff --git a/target/product/full_mips.mk b/target/product/full_mips.mk
index 9418ba2..61734b4 100644
--- a/target/product/full_mips.mk
+++ b/target/product/full_mips.mk
@@ -19,7 +19,7 @@
 # mips build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_mips/device.mk)
 
 include $(SRC_TARGET_DIR)/product/emulator.mk
@@ -28,4 +28,4 @@
 PRODUCT_NAME := full_mips
 PRODUCT_DEVICE := generic_mips
 PRODUCT_BRAND := Android
-PRODUCT_MODEL := Full MIPS Android on Emulator
+PRODUCT_MODEL := AOSP on MIPS Emulator
diff --git a/target/product/full_x86.mk b/target/product/full_x86.mk
index 6e229a5..4dff713 100644
--- a/target/product/full_x86.mk
+++ b/target/product/full_x86.mk
@@ -23,7 +23,7 @@
 # that isn't a wifi connection. This will instruct init.rc to enable the
 # network connection so that you can use it with ADB
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
 
 include $(SRC_TARGET_DIR)/product/emulator.mk
@@ -41,4 +41,4 @@
 PRODUCT_NAME := full_x86
 PRODUCT_DEVICE := generic_x86
 PRODUCT_BRAND := Android
-PRODUCT_MODEL := Full Android on x86 Emulator
+PRODUCT_MODEL := AOSP on IA Emulator
diff --git a/target/product/vbox_x86.mk b/target/product/vbox_x86.mk
index a492774..a7d1b65 100644
--- a/target/product/vbox_x86.mk
+++ b/target/product/vbox_x86.mk
@@ -22,7 +22,7 @@
   PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
 endif
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/board/vbox_x86/device.mk)
 
 PRODUCT_PACKAGES += \
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js
index 3d34352..10d42b2 100644
--- a/tools/droiddoc/templates-sdk/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk/assets/js/docs.js
@@ -11,6 +11,10 @@
 var SITE_ROOT = toRoot + basePath.substring(1,basePath.indexOf("/",1));
 var GOOGLE_DATA; // combined data for google service apis, used for search suggest
   
+// Ensure that all ajax getScript() requests allow caching
+$.ajaxSetup({
+  cache: true
+});
 
 /******  ON LOAD SET UP STUFF *********/
 
@@ -1511,6 +1515,12 @@
 var ROW_COUNT_GOOGLE = 15;          // max number of results in list
 var gGoogleListLength = 0;
 
+function onSuggestionClick(link) {
+  // When user clicks a suggested document, track it
+  _gaq.push(['_trackEvent', 'Suggestion Click', 'clicked: ' + $(link).text(),
+            'from: ' + $("#search_autocomplete").val()]);
+}
+
 function set_item_selected($li, selected)
 {
     if (selected) {
@@ -1540,7 +1550,7 @@
         $(this).addClass('jd-selected');
         gSelectedIndex = $('#search_filtered li').index(this);
     });
-    $li.append('<a></a>');
+    $li.append("<a onclick='onSuggestionClick(this)'></a>");
     $li.attr('class','show-item');
     return $li;
 }
@@ -1894,6 +1904,11 @@
     location.hash = 'q=' + query;
   });
 
+  // once search results load, set up click listeners
+  searchControl.setSearchCompleteCallback(this, function(control, searcher, query) {
+    addResultClickListeners();
+  });
+
   // draw the search results box
   searchControl.draw(document.getElementById("leftSearchControl"), drawOptions);
 
@@ -1972,6 +1987,17 @@
   setTimeout(function(){$(tabHeaders[0]).click()},200);
 }
 
+// add analytics tracking events to each result link
+function addResultClickListeners() {
+  $("#searchResults a.gs-title").each(function(index, link) {
+    // When user clicks enter for Google search results, track it
+    $(link).click(function() {
+      _gaq.push(['_trackEvent', 'Google Click', 'clicked: ' + $(this).text(),
+                'from: ' + $("#search_autocomplete").val()]);
+    });
+  });
+}
+
 
 function getQuery(hash) {
   var queryParts = hash.split('=');
@@ -2297,7 +2323,13 @@
 }
 
 function init_default_navtree(toroot) {
-  init_navtree("tree-list", toroot, NAVTREE_DATA);
+  // load json file for navtree data
+  $.getScript(toRoot + 'navtree_data.js', function(data, textStatus, jqxhr) {
+      // when the file is loaded, initialize the tree
+      if(jqxhr.status === 200) {
+          init_navtree("tree-list", toroot, NAVTREE_DATA);
+      }
+  });
   
   // perform api level toggling because because the whole tree is new to the DOM
   var selectedLevel = $("#apiLevelSelector option:selected").val();
diff --git a/tools/droiddoc/templates-sdk/head_tag.cs b/tools/droiddoc/templates-sdk/head_tag.cs
index 6774ca6..4fa520f 100644
--- a/tools/droiddoc/templates-sdk/head_tag.cs
+++ b/tools/droiddoc/templates-sdk/head_tag.cs
@@ -50,8 +50,6 @@
 <?cs if:reference.gms || reference.gcm || google?>
 <script src="<?cs var:toroot ?>gms_navtree_data.js" async type="text/javascript"></script>
 <script src="<?cs var:toroot ?>gcm_navtree_data.js" async type="text/javascript"></script>
-<?cs elif:reference ?>
-<script src="<?cs var:toroot ?>navtree_data.js" async type="text/javascript"></script>
 <?cs /if ?>
 
 <script type="text/javascript">