HideFromMake in `apexTransitionMutator` should respect special cases

At ToT, platform variants of modules are hidden from make, unless the module
has `//apex_available:platform` in its Android.bp file. However, there
are special cases which always require the platform variant to be
visible to make - e.g. bootstrap bionic libraries.

`markPlatformAvailability` handles these special cases. This CL updates
the subsequent apexTransitionMutator to hide the platform variant when
module.NotAvailableForPlatform is true in addition to the existing
module type specific `AvailableFor` check

Test: no diff in file_list.txt
Bug: 281077552
Change-Id: Ie9d7341e206276ff96d3d64fec21b8f5dcfd6ceb
diff --git a/android/apex.go b/android/apex.go
index 79ee0a8..c4d1a71 100644
--- a/android/apex.go
+++ b/android/apex.go
@@ -700,7 +700,7 @@
 	base.ApexProperties.InAnyApex = true
 	base.ApexProperties.DirectlyInAnyApex = inApex == directlyInApex
 
-	if platformVariation && !ctx.Host() && !module.AvailableFor(AvailableToPlatform) {
+	if platformVariation && !ctx.Host() && !module.AvailableFor(AvailableToPlatform) && module.NotAvailableForPlatform() {
 		// Do not install the module for platform, but still allow it to output
 		// uninstallable AndroidMk entries in certain cases when they have side
 		// effects.  TODO(jiyong): move this routine to somewhere else