summaryrefslogtreecommitdiff
path: root/native/annotator/annotator_jni_common.cc
diff options
context:
space:
mode:
Diffstat (limited to 'native/annotator/annotator_jni_common.cc')
-rw-r--r--native/annotator/annotator_jni_common.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/native/annotator/annotator_jni_common.cc b/native/annotator/annotator_jni_common.cc
index a6f636f..6ee4977 100644
--- a/native/annotator/annotator_jni_common.cc
+++ b/native/annotator/annotator_jni_common.cc
@@ -279,6 +279,23 @@ StatusOr<ClassificationOptions> FromJavaClassificationOptions(
JniHelper::CallBooleanMethod(env, joptions,
get_trigger_dictionary_on_beginner_words));
+ // .getEnableAddContactIntent()
+ TC3_ASSIGN_OR_RETURN(
+ jmethodID get_enable_add_contact_intent,
+ JniHelper::GetMethodID(env, options_class.get(),
+ "getEnableAddContactIntent", "()Z"));
+ TC3_ASSIGN_OR_RETURN(classifier_options.enable_add_contact_intent,
+ JniHelper::CallBooleanMethod(
+ env, joptions, get_enable_add_contact_intent));
+
+ // .getEnableSearchIntent()
+ TC3_ASSIGN_OR_RETURN(jmethodID get_enable_search_intent,
+ JniHelper::GetMethodID(env, options_class.get(),
+ "getEnableSearchIntent", "()Z"));
+ TC3_ASSIGN_OR_RETURN(
+ classifier_options.enable_search_intent,
+ JniHelper::CallBooleanMethod(env, joptions, get_enable_search_intent));
+
return classifier_options;
}