Reland: JNI lib is always embedded for APKs in APEX

If a JNI lib is depended on by an APK that is included in an APEX, the
lib is embedded inside the APK.

This change also fixes a bug that APKs are not mutated for APEXes.

Bug: 144135069
Test: m (apex_test.go amended)
Change-Id: I21ac24412b30c05afc03385655c6b196130dffe3
diff --git a/java/androidmk.go b/java/androidmk.go
index 0510680..c973739 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -262,6 +262,11 @@
 }
 
 func (app *AndroidApp) AndroidMkEntries() android.AndroidMkEntries {
+	if !app.IsForPlatform() {
+		return android.AndroidMkEntries{
+			Disabled: true,
+		}
+	}
 	return android.AndroidMkEntries{
 		Class:      "APPS",
 		OutputFile: android.OptionalPathForPath(app.outputFile),