Don't create non-primary arch variant for recovery-only module

To save space, only the primary arch variant is installed to the
recovery partition. This has been done in the imageMutator by not
creating recovery variant for the non-primary arch.

However, this caused a problem for recover-only module, i.e., recovery:
true. Such module ends up creating no variant for the non-primary arch.
Since every other modules are at least in one image variant, any
dependency fro such module with no image variant can't be satisfied.

In order to solve the problem, archMutator is modified to create only
the primary arch for recovery-only modules.

Bug: 111321972
Test: m -j (TestRecovery added)
Change-Id: Ie32ae06fb094efcfd8531cdf6071139d292d93ab
diff --git a/android/arch.go b/android/arch.go
index ebe9897..d84c829 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -330,6 +330,10 @@
 			// Windows builds always prefer 32-bit
 			prefer32 = true
 		}
+		// only the primary arch in the recovery partition
+		if module.InstallInRecovery() {
+			targets = []Target{mctx.Config().Targets[Device][0]}
+		}
 		targets, err := decodeMultilib(multilib, targets, prefer32)
 		if err != nil {
 			mctx.ModuleErrorf("%s", err.Error())