Revert "Simplify arch target handling"

This reverts commit 6713fb26cbcadf525cd75e47d7d0cbc23d282b3e.

Change-Id: Ic473cea2563b0b37dc08b0bc5d3a0ac8c4b6afe6
diff --git a/android/config.go b/android/config.go
index 5024bce..ee95d2e 100644
--- a/android/config.go
+++ b/android/config.go
@@ -54,8 +54,8 @@
 	ConfigFileName           string
 	ProductVariablesFileName string
 
-	Targets        map[OsClass][]Target
-	BuildOsVariant string
+	DeviceArches []Arch
+	HostArches   map[HostType][]Arch
 
 	srcDir   string // the path of the root source directory
 	buildDir string // the path of the build output directory
@@ -175,21 +175,20 @@
 		config.inMake = true
 	}
 
-	targets, err := decodeTargetProductVariables(config)
+	hostArches, deviceArches, err := decodeArchProductVariables(config.ProductVariables)
 	if err != nil {
 		return Config{}, err
 	}
 
 	if Bool(config.Mega_device) {
-		deviceTargets, err := decodeMegaDevice()
+		deviceArches, err = decodeMegaDevice()
 		if err != nil {
 			return Config{}, err
 		}
-		targets[Device] = deviceTargets
 	}
 
-	config.Targets = targets
-	config.BuildOsVariant = targets[Host][0].String()
+	config.HostArches = hostArches
+	config.DeviceArches = deviceArches
 
 	return config, nil
 }
@@ -326,13 +325,3 @@
 	}
 	return *c.ProductVariables.SanitizeDevice
 }
-
-func (c *config) Android64() bool {
-	for _, t := range c.Targets[Device] {
-		if t.Arch.ArchType.Multilib == "lib64" {
-			return true
-		}
-	}
-
-	return false
-}