/cts/tests/tests/jni/libjnitest/ |
D | android_jni_cts_StaticNonce.c | 29 static void StaticNonce_nop(JNIEnv *env, jclass clazz) { in StaticNonce_nop() argument 34 static jboolean StaticNonce_returnBoolean(JNIEnv *env, jclass clazz) { in StaticNonce_returnBoolean() argument 39 static jbyte StaticNonce_returnByte(JNIEnv *env, jclass clazz) { in StaticNonce_returnByte() argument 44 static jshort StaticNonce_returnShort(JNIEnv *env, jclass clazz) { in StaticNonce_returnShort() argument 49 static jchar StaticNonce_returnChar(JNIEnv *env, jclass clazz) { in StaticNonce_returnChar() argument 54 static jint StaticNonce_returnInt(JNIEnv *env, jclass clazz) { in StaticNonce_returnInt() argument 59 static jlong StaticNonce_returnLong(JNIEnv *env, jclass clazz) { in StaticNonce_returnLong() argument 64 static jfloat StaticNonce_returnFloat(JNIEnv *env, jclass clazz) { in StaticNonce_returnFloat() argument 69 static jdouble StaticNonce_returnDouble(JNIEnv *env, jclass clazz) { in StaticNonce_returnDouble() argument 74 static jobject StaticNonce_returnNull(JNIEnv *env, jclass clazz) { in StaticNonce_returnNull() argument [all …]
|
D | android_jni_cts_InstanceNonce.c | 29 static void InstanceNonce_nop(JNIEnv *env, jobject this) { in InstanceNonce_nop() argument 34 static jboolean InstanceNonce_returnBoolean(JNIEnv *env, jobject this) { in InstanceNonce_returnBoolean() argument 39 static jbyte InstanceNonce_returnByte(JNIEnv *env, jobject this) { in InstanceNonce_returnByte() argument 44 static jshort InstanceNonce_returnShort(JNIEnv *env, jobject this) { in InstanceNonce_returnShort() argument 49 static jchar InstanceNonce_returnChar(JNIEnv *env, jobject this) { in InstanceNonce_returnChar() argument 54 static jint InstanceNonce_returnInt(JNIEnv *env, jobject this) { in InstanceNonce_returnInt() argument 59 static jlong InstanceNonce_returnLong(JNIEnv *env, jobject this) { in InstanceNonce_returnLong() argument 64 static jfloat InstanceNonce_returnFloat(JNIEnv *env, jobject this) { in InstanceNonce_returnFloat() argument 69 static jdouble InstanceNonce_returnDouble(JNIEnv *env, jobject this) { in InstanceNonce_returnDouble() argument 74 static jobject InstanceNonce_returnNull(JNIEnv *env, jobject this) { in InstanceNonce_returnNull() argument [all …]
|
D | macroized_tests.c | 64 #define CALL(name, args...) env->name(args) 70 #define CALL(name, args...) (*env)->name(env , ## args) 88 static char *initializeVariables(JNIEnv *env) { in initializeVariables() argument 127 static jobject getStandardInstance(JNIEnv *env) { in getStandardInstance() argument 135 static jmethodID findStaticMethod(JNIEnv *env, char **errorMsg, in findStaticMethod() argument 151 static jmethodID findInstanceMethod(JNIEnv *env, char **errorMsg, in findInstanceMethod() argument 168 static jmethodID findAppropriateMethod(JNIEnv *env, char **errorMsg, in findAppropriateMethod() argument 172 return findStaticMethod(env, errorMsg, name, sig); in findAppropriateMethod() 174 return findInstanceMethod(env, errorMsg, name, sig); in findAppropriateMethod() 186 static char *help_CallBooleanMethod(JNIEnv *env, int ct, ...) { in help_CallBooleanMethod() argument [all …]
|
D | android_jni_cts_LinkerNamespacesTest.cpp | 111 static std::string load_library(JNIEnv* env, jclass clazz, const std::string& path, in load_library() argument 125 env->GetStaticMethodID(clazz, "loadWithSystemLoad", "(Ljava/lang/String;)Ljava/lang/String;"); in load_library() 126 ScopedLocalRef<jstring> jpath(env, env->NewStringUTF(path.c_str())); in load_library() 127 jstring java_load_errmsg = jstring(env->CallStaticObjectMethod(clazz, java_load, jpath.get())); in load_library() 128 bool java_load_ok = env->GetStringLength(java_load_errmsg) == 0; in load_library() 137 ScopedLocalRef<jstring> jname(env, env->NewStringUTF(baselib.c_str())); in load_library() 138 static jmethodID java_load_lib = env->GetStaticMethodID( in load_library() 140 java_load_lib_errmsg = jstring(env->CallStaticObjectMethod(clazz, java_load_lib, jname.get())); in load_library() 141 java_load_lib_ok = env->GetStringLength(java_load_lib_errmsg) == 0; in load_library() 145 const std::string java_load_error(ScopedUtfChars(env, java_load_errmsg).c_str()); in load_library() [all …]
|
/cts/common/device-side/util/jni/ |
D | android_cts_FileUtils.cpp | 48 jboolean android_cts_FileUtils_getFileStatus(JNIEnv* env, jobject thiz, in android_cts_FileUtils_getFileStatus() argument 51 const char* pathStr = env->GetStringUTFChars(path, NULL); in android_cts_FileUtils_getFileStatus() 60 env->SetIntField(fileStatus, gFileStatusDevFieldID, s.st_dev); in android_cts_FileUtils_getFileStatus() 61 env->SetIntField(fileStatus, gFileStatusInoFieldID, s.st_ino); in android_cts_FileUtils_getFileStatus() 62 env->SetIntField(fileStatus, gFileStatusModeFieldID, s.st_mode); in android_cts_FileUtils_getFileStatus() 63 env->SetIntField(fileStatus, gFileStatusNlinkFieldID, s.st_nlink); in android_cts_FileUtils_getFileStatus() 64 env->SetIntField(fileStatus, gFileStatusUidFieldID, s.st_uid); in android_cts_FileUtils_getFileStatus() 65 env->SetIntField(fileStatus, gFileStatusGidFieldID, s.st_gid); in android_cts_FileUtils_getFileStatus() 66 env->SetLongField(fileStatus, gFileStatusSizeFieldID, s.st_size); in android_cts_FileUtils_getFileStatus() 67 env->SetIntField(fileStatus, gFileStatusBlksizeFieldID, s.st_blksize); in android_cts_FileUtils_getFileStatus() [all …]
|
/cts/tests/tests/permission/jni/ |
D | android_permission_cts_FileUtils.cpp | 52 jboolean android_permission_cts_FileUtils_getFileStatus(JNIEnv* env, in android_permission_cts_FileUtils_getFileStatus() argument 55 ScopedUtfChars cPath(env, path); in android_permission_cts_FileUtils_getFileStatus() 65 env->SetIntField(fileStatus, gFileStatusDevFieldID, s.st_dev); in android_permission_cts_FileUtils_getFileStatus() 66 env->SetIntField(fileStatus, gFileStatusInoFieldID, s.st_ino); in android_permission_cts_FileUtils_getFileStatus() 67 env->SetIntField(fileStatus, gFileStatusModeFieldID, s.st_mode); in android_permission_cts_FileUtils_getFileStatus() 68 env->SetIntField(fileStatus, gFileStatusNlinkFieldID, s.st_nlink); in android_permission_cts_FileUtils_getFileStatus() 69 env->SetIntField(fileStatus, gFileStatusUidFieldID, s.st_uid); in android_permission_cts_FileUtils_getFileStatus() 70 env->SetIntField(fileStatus, gFileStatusGidFieldID, s.st_gid); in android_permission_cts_FileUtils_getFileStatus() 71 env->SetLongField(fileStatus, gFileStatusSizeFieldID, s.st_size); in android_permission_cts_FileUtils_getFileStatus() 72 env->SetIntField(fileStatus, gFileStatusBlksizeFieldID, s.st_blksize); in android_permission_cts_FileUtils_getFileStatus() [all …]
|
/cts/tests/signature/dex-checker/ |
D | dex-checker.cpp | 21 ScopedUtfChars(JNIEnv* env, jstring s) : env_(env), string_(s) { in ScopedUtfChars() argument 25 utf_chars_ = env->GetStringUTFChars(s, NULL); in ScopedUtfChars() 47 JNIEnv* env, jclass, jclass klass, jstring name, jstring type) { in Java_android_signature_cts_DexMemberChecker_getField_1JNI() argument 48 ScopedUtfChars utf_name(env, name); in Java_android_signature_cts_DexMemberChecker_getField_1JNI() 49 ScopedUtfChars utf_type(env, type); in Java_android_signature_cts_DexMemberChecker_getField_1JNI() 50 jfieldID fid = env->GetFieldID(klass, utf_name.c_str(), utf_type.c_str()); in Java_android_signature_cts_DexMemberChecker_getField_1JNI() 51 if (env->ExceptionCheck()) { in Java_android_signature_cts_DexMemberChecker_getField_1JNI() 56 return env->ToReflectedField(klass, fid, /* static */ false); in Java_android_signature_cts_DexMemberChecker_getField_1JNI() 61 JNIEnv* env, jclass, jclass klass, jstring name, jstring type) { in Java_android_signature_cts_DexMemberChecker_getStaticField_1JNI() argument 62 ScopedUtfChars utf_name(env, name); in Java_android_signature_cts_DexMemberChecker_getStaticField_1JNI() [all …]
|
/cts/tests/signature/api-check/src/jni/ |
D | classdescriptors.cpp | 33 static jvmtiError (*get_descriptor_list)(jvmtiEnv* env, jobject loader, jint* cnt, char*** descs); 82 static void abortIfExceptionPending(JNIEnv* env) { in abortIfExceptionPending() argument 83 if (env->ExceptionCheck()) { in abortIfExceptionPending() 99 JNIEnv* env, jclass, jobject loader) { in Java_android_signature_cts_api_BootClassPathClassesProvider_getClassloaderDescriptors() argument 101 jclass rt_exception = env->FindClass("java/lang/RuntimeException"); in Java_android_signature_cts_api_BootClassPathClassesProvider_getClassloaderDescriptors() 102 env->ThrowNew(rt_exception, "get_class_loader_class_descriptor extension is not ready."); in Java_android_signature_cts_api_BootClassPathClassesProvider_getClassloaderDescriptors() 109 jclass rt_exception = env->FindClass("java/lang/RuntimeException"); in Java_android_signature_cts_api_BootClassPathClassesProvider_getClassloaderDescriptors() 110 env->ThrowNew(rt_exception, "Error while executing get_class_loader_class_descriptor."); in Java_android_signature_cts_api_BootClassPathClassesProvider_getClassloaderDescriptors() 114 jobjectArray arr = env->NewObjectArray(cnt, env->FindClass("java/lang/String"), nullptr); in Java_android_signature_cts_api_BootClassPathClassesProvider_getClassloaderDescriptors() 115 if (env->ExceptionCheck()) { in Java_android_signature_cts_api_BootClassPathClassesProvider_getClassloaderDescriptors() [all …]
|
/cts/hostsidetests/jvmti/base/jni/ |
D | tagging.cpp | 31 JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jobject obj, jlong tag) { in Java_android_jvmti_cts_JniBindings_setTag() argument 33 JvmtiErrorToException(env, jvmti_env, ret); in Java_android_jvmti_cts_JniBindings_setTag() 37 JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jobject obj) { in Java_android_jvmti_cts_JniBindings_getTag() argument 40 if (JvmtiErrorToException(env, jvmti_env, ret)) { in Java_android_jvmti_cts_JniBindings_getTag() 47 JNIEnv* env, in Java_android_jvmti_cts_JvmtiTaggingTest_getTaggedObjects() argument 52 ScopedLongArrayRO scoped_array(env); in Java_android_jvmti_cts_JvmtiTaggingTest_getTaggedObjects() 73 if (JvmtiErrorToException(env, jvmti_env, ret)) { in Java_android_jvmti_cts_JvmtiTaggingTest_getTaggedObjects() 84 resultObjectArray = CreateObjectArray(env, result_count, "java/lang/Object", callback); in Java_android_jvmti_cts_JvmtiTaggingTest_getTaggedObjects() 95 resultTagArray = env->NewLongArray(result_count); in Java_android_jvmti_cts_JvmtiTaggingTest_getTaggedObjects() 99 env->SetLongArrayRegion(resultTagArray, 0, result_count, result_tag_array); in Java_android_jvmti_cts_JvmtiTaggingTest_getTaggedObjects() [all …]
|
D | redefine.cpp | 36 JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jclass target, jbyteArray dex_bytes) { in Java_android_jvmti_cts_JvmtiRedefineClassesTest_redefineClass() argument 39 def.class_byte_count = static_cast<jint>(env->GetArrayLength(dex_bytes)); in Java_android_jvmti_cts_JvmtiRedefineClassesTest_redefineClass() 40 signed char* redef_bytes = env->GetByteArrayElements(dex_bytes, nullptr); in Java_android_jvmti_cts_JvmtiRedefineClassesTest_redefineClass() 47 env->ReleaseByteArrayElements(dex_bytes, redef_bytes, 0); in Java_android_jvmti_cts_JvmtiRedefineClassesTest_redefineClass() 54 JNIEnv* env ATTRIBUTE_UNUSED, jclass klass ATTRIBUTE_UNUSED, jclass target) { in Java_android_jvmti_cts_JvmtiRedefineClassesTest_retransformClass() 134 JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jboolean enable) { in Java_android_jvmti_cts_JvmtiRedefineClassesTest_setTransformationEvent() argument 138 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->SetEventCallbacks(&cb, sizeof(cb)))) { in Java_android_jvmti_cts_JvmtiRedefineClassesTest_setTransformationEvent() 141 JvmtiErrorToException(env, in Java_android_jvmti_cts_JvmtiRedefineClassesTest_setTransformationEvent() 152 JNIEnv* env ATTRIBUTE_UNUSED, jclass klass ATTRIBUTE_UNUSED) { in Java_android_jvmti_cts_JvmtiRedefineClassesTest_clearTransformations() 158 JNIEnv* env ATTRIBUTE_UNUSED, jclass klass ATTRIBUTE_UNUSED, jboolean enable) { in Java_android_jvmti_cts_JvmtiRedefineClassesTest_setPopTransformations() [all …]
|
D | cts_agent.cpp | 34 JNIEnv* env, in InformMainAttach() argument 41 register_art_Main(jenv, env); in InformMainAttach() 42 register_android_jvmti_cts_JvmtiRedefineClassesTest(jenv, env); in InformMainAttach() 43 register_android_jvmti_cts_JvmtiTaggingTest(jenv, env); in InformMainAttach() 44 register_android_jvmti_cts_JvmtiTrackingTest(jenv, env); in InformMainAttach() 47 ScopedLocalRef<jclass> klass(env, GetClass(jenv, env, class_name, nullptr)); in InformMainAttach() 50 jmethodID method = env->GetStaticMethodID(klass.get(), method_name, "()V"); in InformMainAttach() 53 env->CallStaticVoidMethod(klass.get(), method); in InformMainAttach() 73 JNIEnv* env; in Agent_OnAttach() local 74 CHECK_EQ(0, vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6)) in Agent_OnAttach() [all …]
|
/cts/tests/tests/net/jni/ |
D | NativeMultinetworkJni.cpp | 40 #define EXPECT_GE(env, actual, expected, msg) \ argument 43 jniThrowExceptionFmt(env, "java/lang/AssertionError", \ 49 #define EXPECT_GT(env, actual, expected, msg) \ argument 52 jniThrowExceptionFmt(env, "java/lang/AssertionError", \ 58 #define EXPECT_EQ(env, expected, actual, msg) \ argument 61 jniThrowExceptionFmt(env, "java/lang/AssertionError", \ 77 int getAsyncResponse(JNIEnv* env, int fd, int timeoutMs, int* rcode, uint8_t* buf, size_t bufLen) { in getAsyncResponse() argument 85 EXPECT_EQ(env, -1, read(fd, &dummy, sizeof(dummy)), "res_nresult check for closing fd"); in getAsyncResponse() 86 EXPECT_EQ(env, EBADF, errno, "res_nresult check for errno"); in getAsyncResponse() 120 int expectAnswersValid(JNIEnv* env, int fd, int family, int expectedRcode) { in expectAnswersValid() argument [all …]
|
/cts/tests/tests/media/libmediandkjni/ |
D | native-mediadrm-jni.cpp | 115 JNIEnv* env, jbyteArray const &byteArray) { in jbyteArrayToVector() argument 117 env->GetByteArrayElements(byteArray, /*is_copy*/NULL)); in jbyteArrayToVector() 119 for (jsize i = 0; i < env->GetArrayLength(byteArray); ++i) { in jbyteArrayToVector() 125 static Uuid jbyteArrayToUuid(JNIEnv* env, jbyteArray const &uuid) { in jbyteArrayToUuid() argument 129 juuid = jbyteArrayToVector(env, uuid); in jbyteArrayToUuid() 135 JNIEnv* env, jclass /*clazz*/, jbyteArray uuid) { in Java_android_media_cts_NativeMediaDrmClearkeyTest_isCryptoSchemeSupportedNative() argument 138 jniThrowException(env, "java/lang/NullPointerException", "null uuid"); in Java_android_media_cts_NativeMediaDrmClearkeyTest_isCryptoSchemeSupportedNative() 142 Uuid juuid = jbyteArrayToUuid(env, uuid); in Java_android_media_cts_NativeMediaDrmClearkeyTest_isCryptoSchemeSupportedNative() 146 jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", in Java_android_media_cts_NativeMediaDrmClearkeyTest_isCryptoSchemeSupportedNative() 152 void initPlaybackParams(JNIEnv* env, const jobject &playbackParams, PlaybackParams ¶ms) { in initPlaybackParams() argument [all …]
|
D | codec-utils-jni.cpp | 121 void initializeGlobalFields(JNIEnv *env) { in initializeGlobalFields() argument 126 jclass imageFormatClazz = env->FindClass("android/graphics/ImageFormat"); in initializeGlobalFields() 127 const jfieldID fieldYUV420888 = env->GetStaticFieldID(imageFormatClazz, "YUV_420_888", "I"); in initializeGlobalFields() 128 gFields.YUV_420_888 = env->GetStaticIntField(imageFormatClazz, fieldYUV420888); in initializeGlobalFields() 129 env->DeleteLocalRef(imageFormatClazz); in initializeGlobalFields() 134 jclass imageClazz = env->FindClass("android/media/cts/CodecImage"); in initializeGlobalFields() 135 gFields.methodWidth = env->GetMethodID(imageClazz, "getWidth", "()I"); in initializeGlobalFields() 136 gFields.methodHeight = env->GetMethodID(imageClazz, "getHeight", "()I"); in initializeGlobalFields() 137 gFields.methodFormat = env->GetMethodID(imageClazz, "getFormat", "()I"); in initializeGlobalFields() 138 gFields.methodTimestamp = env->GetMethodID(imageClazz, "getTimestamp", "()J"); in initializeGlobalFields() [all …]
|
/cts/common/device-side/nativetesthelper/jni/ |
D | gtest_wrapper.cpp | 30 static void RegisterJavaVm(JNIEnv* env) { in RegisterJavaVm() argument 31 (void)env->GetJavaVM(&gVm); in RegisterJavaVm() 86 jobject createTestDescription(JNIEnv* env, jstring className, const std::string& mangledName) { in createTestDescription() argument 87 ScopedLocalRef<jstring> jTestName(env, env->NewStringUTF(mangledName.c_str())); in createTestDescription() 88 return env->CallStaticObjectMethod(gDescription.clazz, gDescription.createTestDescription, in createTestDescription() 92 jobject createTestDescription(JNIEnv* env, jstring className, const char* testCaseName, const char*… in createTestDescription() argument 96 return createTestDescription(env, className, mangledName); in createTestDescription() 99 void addChild(JNIEnv* env, jobject description, jobject childDescription) { in addChild() argument 100 env->CallVoidMethod(description, gDescription.addChild, childDescription); in addChild() 107 JUnitNotifyingListener(JNIEnv* env, jstring className, jobject runNotifier) in JUnitNotifyingListener() argument [all …]
|
/cts/tests/tests/graphics/jni/ |
D | CtsGraphicsJniOnLoad.cpp | 33 JNIEnv* env = nullptr; in JNI_OnLoad() local 34 if (vm->GetEnv((void**)&env, JNI_VERSION_1_4) != JNI_OK) in JNI_OnLoad() 36 if (register_android_graphics_cts_ANativeWindowTest(env)) in JNI_OnLoad() 38 if (register_android_graphics_cts_ASurfaceTextureTest(env)) in JNI_OnLoad() 40 if (register_android_graphics_cts_BitmapTest(env)) in JNI_OnLoad() 42 if (register_android_graphics_cts_CameraGpuCtsActivity(env)) in JNI_OnLoad() 44 if (register_android_graphics_cts_CameraVulkanGpuTest(env)) in JNI_OnLoad() 46 if (register_android_graphics_cts_MediaVulkanGpuTest(env)) in JNI_OnLoad() 48 if (register_android_graphics_cts_VulkanFeaturesTest(env)) in JNI_OnLoad() 50 if (register_android_graphics_cts_VulkanPreTransformCtsActivity(env)) in JNI_OnLoad() [all …]
|
D | android_graphics_cts_SyncTest.cpp | 39 jboolean syncPoll(JNIEnv* env, jclass /*clazz*/, jintArray fds_array, jintArray status_array) { in syncPoll() argument 40 jsize n = env->GetArrayLength(fds_array); in syncPoll() 41 if (env->GetArrayLength(status_array) != n) in syncPoll() 45 jint* fds = static_cast<jint*>(env->GetPrimitiveArrayCritical(fds_array, nullptr)); in syncPoll() 50 env->ReleasePrimitiveArrayCritical(fds_array, fds, 0); in syncPoll() 59 jint* status = static_cast<jint*>(env->GetPrimitiveArrayCritical(status_array, nullptr)); in syncPoll() 70 env->ReleasePrimitiveArrayCritical(status_array, status, 0); in syncPoll() 75 jint syncMerge(JNIEnv* env, jclass /*clazz*/, jstring nameStr, jint fd1, jint fd2) { in syncMerge() argument 76 const char* name = env->GetStringUTFChars(nameStr, nullptr); in syncMerge() 78 env->ReleaseStringUTFChars(nameStr, name); in syncMerge() [all …]
|
/cts/tests/tests/security/jni/ |
D | android_security_cts_LinuxRngTest.cpp | 30 static void throwIOException(JNIEnv* env, const char *format, ...) { in throwIOException() argument 39 jclass cls = env->FindClass("java/io/IOException"); in throwIOException() 40 env->ThrowNew(cls, message); in throwIOException() 45 jint android_security_cts_LinuxRngTest_getCharDeviceMajor(JNIEnv* env, in android_security_cts_LinuxRngTest_getCharDeviceMajor() argument 48 const char* nameStr = env->GetStringUTFChars(name, NULL); in android_security_cts_LinuxRngTest_getCharDeviceMajor() 53 throwIOException(env, "Failed to stat %s: %s", nameStr, strerror(errno)); in android_security_cts_LinuxRngTest_getCharDeviceMajor() 58 throwIOException(env, "%s is not a character device: mode is 0%o", nameStr, st.st_mode); in android_security_cts_LinuxRngTest_getCharDeviceMajor() 66 env->ReleaseStringUTFChars(name, nameStr); in android_security_cts_LinuxRngTest_getCharDeviceMajor() 71 jint android_security_cts_LinuxRngTest_getCharDeviceMinor(JNIEnv* env, in android_security_cts_LinuxRngTest_getCharDeviceMinor() argument 74 const char* nameStr = env->GetStringUTFChars(name, NULL); in android_security_cts_LinuxRngTest_getCharDeviceMinor() [all …]
|
D | CtsSecurityJniOnLoad.cpp | 23 extern int register_android_security_cts_MMapExecutableTest(JNIEnv* env); 24 extern int register_android_security_cts_EncryptionTest(JNIEnv* env); 27 JNIEnv *env = NULL; in JNI_OnLoad() local 29 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { in JNI_OnLoad() 33 if (register_android_security_cts_LinuxRngTest(env)) { in JNI_OnLoad() 37 if (register_android_security_cts_NativeCodeTest(env)) { in JNI_OnLoad() 41 if (register_android_security_cts_MMapExecutableTest(env)) { in JNI_OnLoad() 45 if (register_android_security_cts_EncryptionTest(env)) { in JNI_OnLoad()
|
/cts/tests/tests/rscpp/librscpptest/ |
D | rs_jni.cpp | 65 extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSInitTest_initTest(JNIEnv * env, in Java_android_cts_rscpp_RSInitTest_initTest() argument 69 const char * path = env->GetStringUTFChars(pathObj, NULL); in Java_android_cts_rscpp_RSInitTest_initTest() 76 env->ReleaseStringUTFChars(pathObj, path); in Java_android_cts_rscpp_RSInitTest_initTest() 80 extern "C" JNIEXPORT jboolean JNICALL Java_android_cts_rscpp_RSBlurTest_blurTest(JNIEnv * env, in Java_android_cts_rscpp_RSBlurTest_blurTest() argument 89 const char * path = env->GetStringUTFChars(pathObj, NULL); in Java_android_cts_rscpp_RSBlurTest_blurTest() 90 jbyte * input = (jbyte *) env->GetPrimitiveArrayCritical(inputByteArray, 0); in Java_android_cts_rscpp_RSBlurTest_blurTest() 91 jbyte * output = (jbyte *) env->GetPrimitiveArrayCritical(outputByteArray, 0); in Java_android_cts_rscpp_RSBlurTest_blurTest() 114 env->ReleasePrimitiveArrayCritical(inputByteArray, input, 0); in Java_android_cts_rscpp_RSBlurTest_blurTest() 115 env->ReleasePrimitiveArrayCritical(outputByteArray, output, 0); in Java_android_cts_rscpp_RSBlurTest_blurTest() 116 env->ReleaseStringUTFChars(pathObj, path); in Java_android_cts_rscpp_RSBlurTest_blurTest() [all …]
|
/cts/tests/sensor/jni/ |
D | nativeTestHelper.cpp | 22 extern int register_android_hardware_cts_SensorNativeTest(JNIEnv* env); 23 extern int register_android_hardware_cts_SensorDirectReportTest(JNIEnv* env); 25 void fail(JNIEnv* env, const char* format, ...) { in fail() argument 35 exClass = env->FindClass(className); in fail() 36 jmethodID constructor = env->GetMethodID(exClass, "<init>", in fail() 38 jstring msgStr = env->NewStringUTF(msg); in fail() 39 jobject exception = env->NewObject(exClass, constructor, msgStr, nullptr); in fail() 40 env->Throw(static_cast<jthrowable>(exception)); in fail() 45 JNIEnv *env = NULL; in JNI_OnLoad() local 46 if (vm->GetEnv((void**)&env, JNI_VERSION_1_4) != JNI_OK) { in JNI_OnLoad() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/SplitApp/jni/ |
D | com_android_cts_splitapp_Native.cpp | 28 static jint add(JNIEnv *env, jobject thiz, jint a, jint b) { in add() argument 34 static jstring arch(JNIEnv *env, jobject thiz) { in arch() argument 35 return env->NewStringUTF(__ANDROID_ARCH__); in arch() 45 static int registerNativeMethods(JNIEnv* env, const char* className, JNINativeMethod* gMethods, int… in registerNativeMethods() argument 48 clazz = env->FindClass(className); in registerNativeMethods() 53 if (env->RegisterNatives(clazz, gMethods, numMethods) < 0) { in registerNativeMethods() 61 static int registerNatives(JNIEnv* env) { in registerNatives() argument 62 if (!registerNativeMethods(env, classPathName, methods, sizeof(methods) / sizeof(methods[0]))) { in registerNatives() 70 JNIEnv* env; member 78 JNIEnv* env = NULL; in JNI_OnLoad() local [all …]
|
/cts/tests/tests/os/jni/ |
D | CtsOsJniOnLoad.cpp | 39 JNIEnv *env = NULL; in JNI_OnLoad() local 41 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { in JNI_OnLoad() 45 if (register_android_os_cts_CpuInstructions(env)) { in JNI_OnLoad() 49 if (register_android_os_cts_TaggedPointer(env)) { in JNI_OnLoad() 53 if (register_android_os_cts_HardwareName(env)) { in JNI_OnLoad() 57 if (register_android_os_cts_OSFeatures(env)) { in JNI_OnLoad() 61 if (register_android_os_cts_NoExecutePermissionTest(env)) { in JNI_OnLoad() 65 if (register_android_os_cts_SeccompTest(env)) { in JNI_OnLoad() 69 if (register_android_os_cts_SharedMemoryTest(env)) { in JNI_OnLoad() 73 if (register_android_os_cts_SPMITest(env)) { in JNI_OnLoad()
|
/cts/tests/tests/view/jni/ |
D | android_view_cts_ChoreographerNativeTest.cpp | 34 fail(env, format, ## args); \ 68 static void fail(JNIEnv* env, const char* format, ...) { in fail() argument 78 exClass = env->FindClass(className); in fail() 79 env->ThrowNew(exClass, msg); in fail() 83 static void verifyCallback(JNIEnv* env, Callback* cb, int expectedCount, in verifyCallback() argument 108 JNIEnv* env, jclass, jlong choreographerPtr) { in android_view_cts_ChoreographerNativeTest_testPostCallback64WithoutDelayEventuallyRunsCallback() argument 118 verifyCallback(env, cb1, 1, start, NOMINAL_VSYNC_PERIOD * 3); in android_view_cts_ChoreographerNativeTest_testPostCallback64WithoutDelayEventuallyRunsCallback() 119 verifyCallback(env, cb2, 1, start, NOMINAL_VSYNC_PERIOD * 3); in android_view_cts_ChoreographerNativeTest_testPostCallback64WithoutDelayEventuallyRunsCallback() 130 verifyCallback(env, cb1, 2, start, NOMINAL_VSYNC_PERIOD * 3); in android_view_cts_ChoreographerNativeTest_testPostCallback64WithoutDelayEventuallyRunsCallback() 131 verifyCallback(env, cb2, 1, start, ZERO); in android_view_cts_ChoreographerNativeTest_testPostCallback64WithoutDelayEventuallyRunsCallback() [all …]
|
/cts/tests/tests/media/libaudiojni/ |
D | sl-utils.h | 64 jbyte *envGetArrayElements(JNIEnv *env, jbyteArray array, jboolean *isCopy) { in envGetArrayElements() argument 65 return env->GetByteArrayElements(array, isCopy); in envGetArrayElements() 69 void envReleaseArrayElements(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode) { in envReleaseArrayElements() argument 70 env->ReleaseByteArrayElements(array, elems, mode); in envReleaseArrayElements() 74 jshort *envGetArrayElements(JNIEnv *env, jshortArray array, jboolean *isCopy) { in envGetArrayElements() argument 75 return env->GetShortArrayElements(array, isCopy); in envGetArrayElements() 79 void envReleaseArrayElements(JNIEnv *env, jshortArray array, jshort *elems, jint mode) { in envReleaseArrayElements() argument 80 env->ReleaseShortArrayElements(array, elems, mode); in envReleaseArrayElements() 84 jfloat *envGetArrayElements(JNIEnv *env, jfloatArray array, jboolean *isCopy) { in envGetArrayElements() argument 85 return env->GetFloatArrayElements(array, isCopy); in envGetArrayElements() [all …]
|