Merge "Fix inverted error message" am: 8f33dcc9e3 am: b8cc59cfd3 am: ee9c499267 am: 9870ab1cab am: 6d7588588e

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1804261

Change-Id: Ie786d8fc868e6e8578f6ddf2064d2fb233eaf268
diff --git a/cc/config/vndk.go b/cc/config/vndk.go
index 1dfdc2d..5552524 100644
--- a/cc/config/vndk.go
+++ b/cc/config/vndk.go
@@ -73,6 +73,10 @@
 	"android.hardware.security.sharedsecret-V1-ndk_platform",
 	"android.hardware.security.sharedsecret-ndk_platform",
 	"android.hardware.security.sharedsecret-unstable-ndk_platform",
+	"android.hardware.soundtrigger3-V1-ndk",
+	"android.hardware.soundtrigger3-V1-ndk_platform",
+	"android.hardware.uwb-V1-ndk",
+	"android.hardware.uwb-V1-ndk_platform",
 	"android.hardware.vibrator-V1-ndk_platform",
 	"android.hardware.vibrator-V2-ndk",
 	"android.hardware.vibrator-V2-ndk_platform",
@@ -86,6 +90,7 @@
 	"android.system.keystore2-V1-ndk_platform",
 	"android.system.keystore2-ndk_platform",
 	"android.system.keystore2-unstable-ndk_platform",
+	"android.system.suspend-V1-ndk",
 	"android.system.suspend-V1-ndk_platform",
 	"libbinder",
 	"libcrypto",
diff --git a/java/robolectric.go b/java/robolectric.go
index f216425..5d62aee 100644
--- a/java/robolectric.go
+++ b/java/robolectric.go
@@ -417,8 +417,10 @@
 		}
 		runtimeFromSourceJar := android.OutputFileForModule(ctx, runtimeFromSourceModule, "")
 
-		runtimeName := fmt.Sprintf("android-all-%s-robolectric-r0.jar",
-			    ctx.Config().PlatformSdkCodename())
+		// "TREE" name is essential here because it hooks into the "TREE" name in
+		// Robolectric's SdkConfig.java that will always correspond to the NEWEST_SDK
+		// in Robolectric configs.
+		runtimeName := "android-all-current-robolectric-r0.jar"
 		installedRuntime := ctx.InstallFile(androidAllDir, runtimeName, runtimeFromSourceJar)
 		r.runtimes = append(r.runtimes, installedRuntime)
 	}