Allow //visibility:public to override other visibility rules.

However only allow it when they are merged from different defaults.

Extend the tests to cover that and other cases with visibilities in
defaults.

Also avoid dumping the whole visibility spec in the error message when a
visibility check fails, because it gets noisy for long visibility lists, and
can be confusing when //visibility:public gets merged with other visibility
rules.

Test: Soong self test
Bug: 112158820
Bug: 130796911
Change-Id: I242513975a3f824b9ea2eab5b94b194b9af2481b
diff --git a/android/mutator.go b/android/mutator.go
index 085c055..0e80249 100644
--- a/android/mutator.go
+++ b/android/mutator.go
@@ -76,6 +76,7 @@
 	registerLoadHookMutator,
 	RegisterNamespaceMutator,
 	RegisterPrebuiltsPreArchMutators,
+	registerVisibilityRuleChecker,
 	RegisterDefaultsPreArchMutators,
 	registerVisibilityRuleGatherer,
 }