Revert "Pass --non-updatable-system flag to aapt2 when versionCode is unspecified"

This reverts commit ce320f86a084cb29d5f4e24aee221e9e4dd4fb47.

Reason for revert: <Dorid monitor: Likely culprit for b/347143262  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Change-Id: I70eabe014acc6feb123f28ac487f7d7d39e9fb6b
diff --git a/java/aar.go b/java/aar.go
index 1d05e48..07392f6 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -107,10 +107,6 @@
 
 	// Names of aconfig_declarations modules that specify aconfig flags that the module depends on.
 	Flags_packages []string
-
-	// If set, `--non-updatable-system` flag is not passed to aapt2 even when
-	// `--version-code` is not specified in the `aaptFlags` property list or in the manifest.
-	DisableNonUpdatableSystem bool `blueprint:"mutated"`
 }
 
 type aapt struct {
@@ -312,9 +308,9 @@
 	// This behavior has been copied from Make.
 	linkFlags = append(linkFlags, "--target-sdk-version "+minSdkVersion)
 
-	// Mark non updatable when the module does not specify a version code
-	if !a.aaptProperties.DisableNonUpdatableSystem && !hasVersionCode {
-		linkFlags = append(linkFlags, "--non-updatable-system")
+	// Version code
+	if !hasVersionCode {
+		linkFlags = append(linkFlags, "--version-code", ctx.Config().PlatformSdkVersion().String())
 	}
 
 	if !hasVersionName {