Rename common to android

Rename the "common" package to "android", because common is too
generic.  Also removes all android.Android naming stutter.

Ran:
gomvpkg -from 'android/soong/common' -to 'android/soong/android'
gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext'
gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext'
gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase'
gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext'
gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext'
gorename -from '"android/soong/android".AndroidModule' -to 'Module'

Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7
diff --git a/java/app.go b/java/app.go
index 3d16281..db2f182 100644
--- a/java/app.go
+++ b/java/app.go
@@ -22,7 +22,7 @@
 
 	"github.com/google/blueprint"
 
-	"android/soong/common"
+	"android/soong/android"
 )
 
 // AAR prebuilts
@@ -61,8 +61,8 @@
 
 	appProperties androidAppProperties
 
-	aaptJavaFileList common.Path
-	exportPackage    common.Path
+	aaptJavaFileList android.Path
+	exportPackage    android.Path
 }
 
 func (a *AndroidApp) JavaDependencies(ctx AndroidJavaModuleContext) []string {
@@ -80,7 +80,7 @@
 	return deps
 }
 
-func (a *AndroidApp) GenerateJavaBuildActions(ctx common.AndroidModuleContext) {
+func (a *AndroidApp) GenerateJavaBuildActions(ctx android.ModuleContext) {
 	aaptFlags, aaptDeps, hasResources := a.aaptFlags(ctx)
 
 	if hasResources {
@@ -143,16 +143,16 @@
 	} else if dir, _ := filepath.Split(certificate); dir == "" {
 		certificate = filepath.Join(ctx.AConfig().DefaultAppCertificateDir(ctx).String(), certificate)
 	} else {
-		certificate = filepath.Join(common.PathForSource(ctx).String(), certificate)
+		certificate = filepath.Join(android.PathForSource(ctx).String(), certificate)
 	}
 
 	certificates := []string{certificate}
 	for _, c := range a.appProperties.Additional_certificates {
-		certificates = append(certificates, filepath.Join(common.PathForSource(ctx).String(), c))
+		certificates = append(certificates, filepath.Join(android.PathForSource(ctx).String(), c))
 	}
 
 	a.outputFile = CreateAppPackage(ctx, aaptPackageFlags, a.outputFile, certificates)
-	ctx.InstallFileName(common.PathForModuleInstall(ctx, "app"), ctx.ModuleName()+".apk", a.outputFile)
+	ctx.InstallFileName(android.PathForModuleInstall(ctx, "app"), ctx.ModuleName()+".apk", a.outputFile)
 }
 
 var aaptIgnoreFilenames = []string{
@@ -167,7 +167,7 @@
 	"*~",
 }
 
-func (a *AndroidApp) aaptFlags(ctx common.AndroidModuleContext) ([]string, common.Paths, bool) {
+func (a *AndroidApp) aaptFlags(ctx android.ModuleContext) ([]string, android.Paths, bool) {
 	aaptFlags := a.appProperties.Aaptflags
 	hasVersionCode := false
 	hasVersionName := false
@@ -183,10 +183,10 @@
 		aaptFlags = append(aaptFlags, "-z")
 	}
 
-	assetDirs := common.PathsWithOptionalDefaultForModuleSrc(ctx, a.appProperties.Asset_dirs, "assets")
-	resourceDirs := common.PathsWithOptionalDefaultForModuleSrc(ctx, a.appProperties.Android_resource_dirs, "res")
+	assetDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.appProperties.Asset_dirs, "assets")
+	resourceDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.appProperties.Android_resource_dirs, "res")
 
-	var overlayResourceDirs common.Paths
+	var overlayResourceDirs android.Paths
 	// For every resource directory, check if there is an overlay directory with the same path.
 	// If found, it will be prepended to the list of resource directories.
 	for _, overlayDir := range ctx.AConfig().ResourceOverlays() {
@@ -204,7 +204,7 @@
 
 	// aapt needs to rerun if any files are added or modified in the assets or resource directories,
 	// use glob to create a filelist.
-	var aaptDeps common.Paths
+	var aaptDeps android.Paths
 	var hasResources bool
 	for _, d := range resourceDirs {
 		newDeps := ctx.Glob("app_resources", filepath.Join(d.String(), "**/*"), aaptIgnoreFilenames)
@@ -225,20 +225,20 @@
 		manifestFile = *a.properties.Manifest
 	}
 
-	manifestPath := common.PathForModuleSrc(ctx, manifestFile)
+	manifestPath := android.PathForModuleSrc(ctx, manifestFile)
 	aaptDeps = append(aaptDeps, manifestPath)
 
 	aaptFlags = append(aaptFlags, "-M "+manifestPath.String())
-	aaptFlags = append(aaptFlags, common.JoinWithPrefix(assetDirs.Strings(), "-A "))
-	aaptFlags = append(aaptFlags, common.JoinWithPrefix(resourceDirs.Strings(), "-S "))
+	aaptFlags = append(aaptFlags, android.JoinWithPrefix(assetDirs.Strings(), "-A "))
+	aaptFlags = append(aaptFlags, android.JoinWithPrefix(resourceDirs.Strings(), "-S "))
 
 	ctx.VisitDirectDeps(func(module blueprint.Module) {
-		var depFile common.OptionalPath
+		var depFile android.OptionalPath
 		if sdkDep, ok := module.(sdkDependency); ok {
-			depFile = common.OptionalPathForPath(sdkDep.ClasspathFile())
+			depFile = android.OptionalPathForPath(sdkDep.ClasspathFile())
 		} else if javaDep, ok := module.(JavaDependency); ok {
 			if ctx.OtherModuleName(module) == "framework-res" {
-				depFile = common.OptionalPathForPath(javaDep.(*javaBase).module.(*AndroidApp).exportPackage)
+				depFile = android.OptionalPathForPath(javaDep.(*javaBase).module.(*AndroidApp).exportPackage)
 			}
 		}
 		if depFile.Valid() {
@@ -278,5 +278,5 @@
 
 	module.properties.Dex = true
 
-	return NewJavaBase(&module.javaBase, module, common.DeviceSupported, &module.appProperties)
+	return NewJavaBase(&module.javaBase, module, android.DeviceSupported, &module.appProperties)
 }