summaryrefslogtreecommitdiff
path: root/tools/aapt2/jni/aapt2_jni.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/jni/aapt2_jni.cpp')
-rw-r--r--tools/aapt2/jni/aapt2_jni.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/aapt2/jni/aapt2_jni.cpp b/tools/aapt2/jni/aapt2_jni.cpp
index 211ada8db078..a5e09a2c9d57 100644
--- a/tools/aapt2/jni/aapt2_jni.cpp
+++ b/tools/aapt2/jni/aapt2_jni.cpp
@@ -46,8 +46,8 @@ static std::vector<ScopedUtfChars> list_to_utfchars(JNIEnv *env, jobject obj) {
// Now, iterate all strings in the list
// (note: generic erasure means get() return an Object)
- jmethodID get_method_id =
- env->GetMethodID(list_cls, "get", "()Ljava/lang/Object;");
+ jmethodID get_method_id = env->GetMethodID(list_cls, "get", "(I)Ljava/lang/Object;");
+ CHECK(get_method_id != 0);
for (jint i = 0; i < size; i++) {
// Call get(i) to get the string in the ith position.
jobject string_obj_uncast = env->CallObjectMethod(obj, get_method_id, i);
@@ -92,3 +92,8 @@ JNIEXPORT void JNICALL Java_com_android_tools_aapt2_Aapt2_nativeLink(
std::vector<aapt::StringPiece> link_args = extract_pieces(link_args_jni);
aapt::Link(link_args);
}
+
+JNIEXPORT void JNICALL Java_com_android_tools_aapt2_Aapt2_ping(
+ JNIEnv *env, jclass aapt_obj) {
+ // This is just a dummy method to see if the library has been loaded.
+}