Revert "Revert "Copy generated xml file for NDK api coverage to dist when CLANG_COVERAGE flag set.""

This reverts commit dd9467aa2314b8b18c3820a7b706c85ed9670db6.

Reason for revert: Fix to the breakage merged in https://android-review.googlesource.com/c/platform/build/soong/+/1332082.

Forest test build pass: http://shortn/_AWiWymhTjF

Change-Id: Ie47b84c51e85c8d372c5ee49963d671ff08ef91a
diff --git a/core/main.mk b/core/main.mk
index 5d2ec7c..2b59c07 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1665,6 +1665,11 @@
   $(call dist-for-goals, dist_files, $(api_xmls))
   api_xmls :=
 
+  ifdef CLANG_COVERAGE
+    $(foreach f,$(SOONG_NDK_API_XML), \
+        $(call dist-for-goals,droidcore,$(f):ndk_coverage_xml_dir/$(notdir $(f))))
+  endif
+
 # Building a full system-- the default is to build droidcore
 droid_targets: droidcore dist_files