summaryrefslogtreecommitdiff
path: root/libartpalette/apex/palette_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libartpalette/apex/palette_test.cc')
-rw-r--r--libartpalette/apex/palette_test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libartpalette/apex/palette_test.cc b/libartpalette/apex/palette_test.cc
index 0bcc09329b..16f283872b 100644
--- a/libartpalette/apex/palette_test.cc
+++ b/libartpalette/apex/palette_test.cc
@@ -22,6 +22,7 @@
#include <unistd.h>
#include "gtest/gtest.h"
+#include "nativehelper/JniInvocation.h" \
namespace {
@@ -78,6 +79,11 @@ TEST_F(PaletteClientTest, JniInvocation) {
bool enabled;
EXPECT_EQ(PALETTE_STATUS_OK, PaletteShouldReportJniInvocations(&enabled));
+ // This calls JniInvocationInit, which is necessary to load the VM. It's not
+ // public but still stable.
+ JniInvocation jni_invocation;
+ ASSERT_TRUE(jni_invocation.Init(nullptr));
+
JavaVMInitArgs vm_args;
JavaVMOption options[] = {
{.optionString = "-verbose:jni", .extraInfo = nullptr},