Fix test app and helper installation dirs.

Fixes: 143902486
Test: app_test.go + m CtsIsolatedSplitApp
Change-Id: I3e1b8bf14cb9f440a6d8b0d2ac65525f00470cb8
diff --git a/java/app.go b/java/app.go
index e1128c9..c635703 100644
--- a/java/app.go
+++ b/java/app.go
@@ -448,7 +448,7 @@
 	} else if a.Privileged() {
 		a.installDir = android.PathForModuleInstall(ctx, "priv-app", a.installApkName)
 	} else if ctx.InstallInTestcases() {
-		a.installDir = android.PathForModuleInstall(ctx, a.installApkName)
+		a.installDir = android.PathForModuleInstall(ctx, a.installApkName, ctx.DeviceConfig().DeviceArch())
 	} else {
 		a.installDir = android.PathForModuleInstall(ctx, "app", a.installApkName)
 	}
@@ -697,6 +697,10 @@
 	appTestHelperAppProperties appTestHelperAppProperties
 }
 
+func (a *AndroidTestHelperApp) InstallInTestcases() bool {
+	return true
+}
+
 // android_test_helper_app compiles sources and Android resources into an Android application package `.apk` file that
 // will be used by tests, but does not produce an `AndroidTest.xml` file so the module will not be run directly as a
 // test.