Change the partition of outputfile

If some apex module can be installed for both flattened and unflattened,
flattened apex should be installed to system_ext partition.
So add MakeAsSystemExt func to change the partition from system to
system_ext.

Bug: 139053989
Test: m -j
Change-Id: I3e3430413a9045d96130af99e249567b1a26ed7e
diff --git a/android/module.go b/android/module.go
index e8d7360..fa6388c 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1514,6 +1514,12 @@
 	m.commonProperties.Native_bridge_supported = boolPtr(true)
 }
 
+func (m *ModuleBase) MakeAsSystemExt() {
+	if !Bool(m.commonProperties.Vendor) && !Bool(m.commonProperties.Product_specific) {
+		m.commonProperties.System_ext_specific = boolPtr(true)
+	}
+}
+
 // IsNativeBridgeSupported returns true if "native_bridge_supported" is explicitly set as "true"
 func (m *ModuleBase) IsNativeBridgeSupported() bool {
 	return proptools.Bool(m.commonProperties.Native_bridge_supported)