Merge "Include VNDK snapshot for 32 bit binder"
diff --git a/core/product-graph.mk b/core/product-graph.mk
index 576d14d..4133bd9 100644
--- a/core/product-graph.mk
+++ b/core/product-graph.mk
@@ -18,7 +18,7 @@
 define gather-all-products
 $(sort $(foreach p, \
 	$(eval _all_products_visited := )
-  $(call all-products-inner, $(ALL_PRODUCTS)) \
+  $(call all-products-inner, $(PARENT_PRODUCT_FILES)) \
 	, $(if $(strip $(p)),$(strip $(p)),)) \
 )
 endef
@@ -49,7 +49,7 @@
 endif
 endif
 
-really_all_products := $(call gather-all-products)
+all_products := $(call gather-all-products)
 
 open_parethesis := (
 close_parenthesis := )
@@ -66,7 +66,7 @@
 
 endef
 
-$(products_graph): PRIVATE_PRODUCTS := $(really_all_products)
+$(products_graph): PRIVATE_PRODUCTS := $(all_products)
 $(products_graph): PRIVATE_PRODUCTS_FILTER := $(products_list)
 
 $(products_graph): $(this_makefile)
@@ -130,7 +130,7 @@
 endef
 
 product_debug_files:=
-$(foreach p,$(really_all_products), \
+$(foreach p,$(all_products), \
 			$(eval $(call transform-product-debug, $(p))) \
 			$(eval product_debug_files += $(call product-debug-filename, $(p))) \
    )
diff --git a/core/product.mk b/core/product.mk
index 95d169c..f9174cc 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -213,10 +213,14 @@
 #
 # $(1): product to inherit
 #
-# Does three things:
+# To be called from product makefiles, and is later evaluated during the import-nodes
+# call below. It does three things:
 #  1. Inherits all of the variables from $1.
 #  2. Records the inheritance in the .INHERITS_FROM variable
-#  3. Records that we've visited this node, in ALL_PRODUCTS
+#  3. Records the calling makefile in PARENT_PRODUCT_FILES
+#
+# (2) and (3) can be used together to reconstruct the include hierarchy
+# See e.g. product-graph.mk for an example of this.
 #
 define inherit-product
   $(if $(findstring ../,$(1)),\
@@ -224,11 +228,10 @@
     $(eval np := $(strip $(1))))\
   $(foreach v,$(_product_var_list), \
       $(eval $(v) := $($(v)) $(INHERIT_TAG)$(np))) \
-  $(eval inherit_var := \
-      PRODUCTS.$(strip $(word 1,$(_include_stack))).INHERITS_FROM) \
+  $(eval current_mk := $(strip $(word 1,$(_include_stack)))) \
+  $(eval inherit_var := PRODUCTS.$(current_mk).INHERITS_FROM) \
   $(eval $(inherit_var) := $(sort $($(inherit_var)) $(np))) \
-  $(eval inherit_var:=) \
-  $(eval ALL_PRODUCTS := $(sort $(ALL_PRODUCTS) $(word 1,$(_include_stack))))
+  $(eval PARENT_PRODUCT_FILES := $(sort $(PARENT_PRODUCT_FILES) $(current_mk)))
 endef
 
 
diff --git a/target/product/base.mk b/target/product/base.mk
index 74514af..b8ba52b 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -59,7 +59,6 @@
     libcamera_client \
     libcameraservice \
     libcamera2ndk \
-    libdl \
     libdrmclearkeyplugin \
     libclearkeycasplugin \
     libeffectproxy \
@@ -98,7 +97,6 @@
     libstagefright_omx \
     libstagefright_yuv \
     libusbhost \
-    libutils \
     libvisualizer \
     libvorbisidec \
     libmediandk \
diff --git a/target/product/core_base.mk b/target/product/core_base.mk
index 7dc0010..be10857 100644
--- a/target/product/core_base.mk
+++ b/target/product/core_base.mk
@@ -26,7 +26,6 @@
     Home \
     TelephonyProvider \
     UserDictionaryProvider \
-    atrace \
     libandroidfw \
     libaudiopreprocessing \
     libaudioutils \
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
index 190a889..9ab6df0 100644
--- a/target/product/generic_no_telephony.mk
+++ b/target/product/generic_no_telephony.mk
@@ -35,7 +35,6 @@
 PRODUCT_PACKAGES += \
     clatd \
     clatd.conf \
-    pppd \
     screenrecord
 
 PRODUCT_PACKAGES += \