Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85437f29 authored by Spandan Das's avatar Spandan Das Committed by Automerger Merge Worker
Browse files

Add a source_module_name to android_app am: efa14657

parents abd735bb efa14657
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -145,6 +145,11 @@ type AndroidAppImportProperties struct {
	// Whether or not to skip checking the preprocessed apk for proper alignment and uncompressed
	// JNI libs and dex files. Default is false
	Skip_preprocessed_apk_checks *bool

	// Name of the source soong module that gets shadowed by this prebuilt
	// If unspecified, follows the naming convention that the source module of
	// the prebuilt is Name() without "prebuilt_" prefix
	Source_module_name *string
}

func (a *AndroidAppImport) IsInstallable() bool {
@@ -274,6 +279,10 @@ func (a *AndroidAppImport) InstallApkName() string {
	return a.BaseModuleName()
}

func (a *AndroidAppImport) BaseModuleName() string {
	return proptools.StringDefault(a.properties.Source_module_name, a.ModuleBase.Name())
}

func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext) {
	if a.Name() == "prebuilt_framework-res" {
		ctx.ModuleErrorf("prebuilt_framework-res found. This used to have special handling in soong, but was removed due to prebuilt_framework-res no longer existing. This check is to ensure it doesn't come back without readding the special handling.")