Revert "Remove apex.apex_name"

This reverts commit df26332d50c9c156b13844b4dbbecb43df6e3e1c.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_tm-qpr-dev-plus-aosp&target=aosp_sunfish-userdebug&lkgb=9578804&lkbb=9579062&fkbb=9578931, bug b/268301897

Change-Id: I819a416286cda63a6fa8d3d6b4343c86638b4dc9
BUG: 268301897
diff --git a/apex/apex.go b/apex/apex.go
index b1bd56f..3cdcd79 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -94,6 +94,10 @@
 	// a default one is automatically generated.
 	AndroidManifest *string `android:"path"`
 
+	// Canonical name of this APEX bundle. Used to determine the path to the activated APEX on
+	// device (/apex/<apex_name>). If unspecified, follows the name property.
+	Apex_name *string
+
 	// Determines the file contexts file for setting the security contexts to files in this APEX
 	// bundle. For platform APEXes, this should points to a file under /system/sepolicy Default:
 	// /system/sepolicy/apex/<module_name>_file_contexts.
@@ -1033,7 +1037,7 @@
 	// This is the main part of this mutator. Mark the collected dependencies that they need to
 	// be built for this apexBundle.
 
-	apexVariationName := mctx.ModuleName() // could be com.android.foo
+	apexVariationName := proptools.StringDefault(a.properties.Apex_name, mctx.ModuleName()) // could be com.android.foo
 	a.properties.ApexVariationName = apexVariationName
 	apexInfo := android.ApexInfo{
 		ApexVariationName: apexVariationName,