Deprecate notice property.

Bug: 192434786

Test: m droid dist

Change-Id: Id47ff3c945b556ea0452a91305f7637bbcc35008
diff --git a/android/neverallow.go b/android/neverallow.go
index aa47bca..357cae5 100644
--- a/android/neverallow.go
+++ b/android/neverallow.go
@@ -58,6 +58,7 @@
 	AddNeverAllowRules(createMakefileGoalRules()...)
 	AddNeverAllowRules(createInitFirstStageRules()...)
 	AddNeverAllowRules(createProhibitFrameworkAccessRules()...)
+	AddNeverAllowRules(createNoticeDeprecationRules()...)
 }
 
 // Add a NeverAllow rule to the set of rules to apply.
@@ -238,6 +239,15 @@
 	}
 }
 
+func createNoticeDeprecationRules() []Rule {
+	return []Rule{
+		NeverAllow().
+			WithMatcher("notice", isSetMatcherInstance).
+			NotIn("vendor/linaro/linux-firmware/").
+			Because("notice has been replaced by licenses/default_applicable_licenses"),
+	}
+}
+
 func neverallowMutator(ctx BottomUpMutatorContext) {
 	m, ok := ctx.Module().(Module)
 	if !ok {