Lines Matching refs:env
68 NullableScopedUtfChars(JNIEnv* env, jstring s) : mEnv(env), mString(s) { in NullableScopedUtfChars() argument
69 mUtfChars = (s != NULL) ? env->GetStringUTFChars(s, NULL) : NULL; in NullableScopedUtfChars()
101 static jlong DexFile_openDexFileNative(JNIEnv* env, jclass, jstring javaSourceName, jstring javaOut… in DexFile_openDexFileNative() argument
102 ScopedUtfChars sourceName(env, javaSourceName); in DexFile_openDexFileNative()
106 NullableScopedUtfChars outputName(env, javaOutputName); in DexFile_openDexFileNative()
107 if (env->ExceptionCheck()) { in DexFile_openDexFileNative()
126 ScopedObjectAccess soa(env); in DexFile_openDexFileNative()
140 static std::vector<const DexFile*>* toDexFiles(jlong dex_file_address, JNIEnv* env) { in toDexFiles() argument
144 ScopedObjectAccess soa(env); in toDexFiles()
150 static void DexFile_closeDexFile(JNIEnv* env, jclass, jlong cookie) { in DexFile_closeDexFile() argument
151 std::unique_ptr<std::vector<const DexFile*>> dex_files(toDexFiles(cookie, env)); in DexFile_closeDexFile()
155 ScopedObjectAccess soa(env); in DexFile_closeDexFile()
169 static jclass DexFile_defineClassNative(JNIEnv* env, jclass, jstring javaName, jobject javaLoader, in DexFile_defineClassNative() argument
171 std::vector<const DexFile*>* dex_files = toDexFiles(cookie, env); in DexFile_defineClassNative()
176 ScopedUtfChars class_name(env, javaName); in DexFile_defineClassNative()
186 ScopedObjectAccess soa(env); in DexFile_defineClassNative()
212 static jobjectArray DexFile_getClassNameList(JNIEnv* env, jclass, jlong cookie) { in DexFile_getClassNameList() argument
214 std::vector<const DexFile*>* dex_files = toDexFiles(cookie, env); in DexFile_getClassNameList()
229 result = env->NewObjectArray(descriptors.size(), WellKnownClasses::java_lang_String, nullptr); in DexFile_getClassNameList()
236 ScopedLocalRef<jstring> jdescriptor(env, env->NewStringUTF(descriptor.c_str())); in DexFile_getClassNameList()
240 env->SetObjectArrayElement(result, i, jdescriptor.get()); in DexFile_getClassNameList()
368 static jbyte IsDexOptNeededInternal(JNIEnv* env, const char* filename, in CopyProfileFile() argument
377 ScopedLocalRef<jclass> fnfe(env, env->FindClass("java/io/FileNotFoundException")); in CopyProfileFile()
379 env->ThrowNew(fnfe.get(), message); in CopyProfileFile()
496 ScopedLocalRef<jclass> iae(env, env->FindClass("java/lang/IllegalArgumentException")); in CopyProfileFile()
498 env->ThrowNew(iae.get(), message.c_str()); in CopyProfileFile()
561 static jbyte DexFile_isDexOptNeededInternal(JNIEnv* env, jclass, jstring javaFilename, in CopyProfileFile() argument
563 ScopedUtfChars filename(env, javaFilename); in CopyProfileFile()
564 if (env->ExceptionCheck()) { in CopyProfileFile()
568 NullableScopedUtfChars pkgname(env, javaPkgname); in CopyProfileFile()
570 ScopedUtfChars instruction_set(env, javaInstructionSet); in CopyProfileFile()
571 if (env->ExceptionCheck()) { in CopyProfileFile()
575 return IsDexOptNeededInternal(env, filename.c_str(), pkgname.c_str(), in CopyProfileFile()
580 static jboolean DexFile_isDexOptNeeded(JNIEnv* env, jclass, jstring javaFilename) { in CopyProfileFile() argument
582 ScopedUtfChars filename(env, javaFilename); in CopyProfileFile()
583 return kUpToDate != IsDexOptNeededInternal(env, filename.c_str(), nullptr /* pkgname */, in CopyProfileFile()
597 void register_dalvik_system_DexFile(JNIEnv* env) { in CopyProfileFile() argument