Notice support for APEX

Notice file for an APEX is created by merging notice files for the
modules included in it (plus the notice file for the APEX itself if
specified).

Notice files having the same content are not duplicated; it is emitted
only once.

Bug: 128701495
Test: m (apex_test is amended)
Test: m and inspect $(PRODUCT_OUT)/obj/NOTICE.txt to check there are
license entries for /system/apex/*.apex files

Change-Id: I169d91038291a6c71615de97cf5b03174afab5d4
diff --git a/android/androidmk.go b/android/androidmk.go
index fc34471..bd49e4c 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -319,7 +319,7 @@
 		}
 	}
 
-	if amod.noticeFile != nil {
+	if amod.noticeFile.Valid() {
 		fmt.Fprintln(&data.preamble, "LOCAL_NOTICE_FILE :=", amod.noticeFile.String())
 	}