Add host required arguments to FontFamily_getVariant

Native critical methods are not supported when running on host JVM. They
need the environment and class arguments. To add those only for host,
this uses specially defined macros.

Bug: 74062470
Test: lunch sdk && m libandroid_runtime
Change-Id: I9efff6e4f1132f0566e72c6c91ab101d10c1406a
This commit is contained in:
Jerome Gaillard
2021-02-05 18:53:34 +00:00
parent 2d16f0aac2
commit ecb871d490

View File

@@ -95,7 +95,7 @@ static jstring FontFamily_getLangTags(JNIEnv* env, jobject, jlong familyPtr) {
}
// CriticalNative
static jint FontFamily_getVariant(jlong familyPtr) {
static jint FontFamily_getVariant(CRITICAL_JNI_PARAMS_COMMA jlong familyPtr) {
FontFamilyWrapper* family = reinterpret_cast<FontFamilyWrapper*>(familyPtr);
return static_cast<jint>(family->family->variant());
}