/frameworks/base/ravenwood/runtime-jni/ |
D | ravenwood_os_constants.cpp | 75 static void initConstant(JNIEnv* env, jclass c, const char* fieldName, int value) { in initConstant() argument 76 jfieldID field = env->GetStaticFieldID(c, fieldName, "I"); in initConstant() 77 env->SetStaticIntField(c, field, value); in initConstant() 80 static void OsConstants_initConstants(JNIEnv* env, jclass) { in OsConstants_initConstants() argument 83 jclass c = env->FindClass("android/system/OsConstants"); in OsConstants_initConstants() 86 initConstant(env, c, "AF_INET", AF_INET); in OsConstants_initConstants() 87 initConstant(env, c, "AF_INET6", AF_INET6); in OsConstants_initConstants() 88 initConstant(env, c, "AF_PACKET", AF_PACKET); in OsConstants_initConstants() 89 initConstant(env, c, "AF_NETLINK", AF_NETLINK); in OsConstants_initConstants() 90 initConstant(env, c, "AF_UNIX", AF_UNIX); in OsConstants_initConstants() [all …]
|
/frameworks/base/media/jni/ |
D | android_mtp_MtpDevice.cpp | 114 static void initializeJavaIDs(JNIEnv* env) { in initializeJavaIDs() argument 117 std::call_once(sJniInitialized, [](JNIEnv* env) { in initializeJavaIDs() argument 119 (jclass)env->NewGlobalRef(FindClassOrDie(env, "android/mtp/MtpDeviceInfo")); in initializeJavaIDs() 120 constructor_deviceInfo = GetMethodIDOrDie(env, clazz_deviceInfo, "<init>", "()V"); in initializeJavaIDs() 122 GetFieldIDOrDie(env, clazz_deviceInfo, "mManufacturer", "Ljava/lang/String;"); in initializeJavaIDs() 124 GetFieldIDOrDie(env, clazz_deviceInfo, "mModel", "Ljava/lang/String;"); in initializeJavaIDs() 126 GetFieldIDOrDie(env, clazz_deviceInfo, "mVersion", "Ljava/lang/String;"); in initializeJavaIDs() 128 GetFieldIDOrDie(env, clazz_deviceInfo, "mSerialNumber", "Ljava/lang/String;"); in initializeJavaIDs() 130 GetFieldIDOrDie(env, clazz_deviceInfo, "mOperationsSupported", "[I"); in initializeJavaIDs() 132 GetFieldIDOrDie(env, clazz_deviceInfo, "mEventsSupported", "[I"); in initializeJavaIDs() [all …]
|
D | android_media_MediaRecorder.cpp | 57 extern sp<Camera> get_native_camera(JNIEnv *env, jobject thiz, struct JNICameraContext** context); 59 android_media_MediaCodec_getPersistentInputSurface(JNIEnv* env, jobject object); 82 JNIMediaRecorderListener(JNIEnv* env, jobject thiz, jobject weak_thiz); 91 JNIMediaRecorderListener::JNIMediaRecorderListener(JNIEnv* env, jobject thiz, jobject weak_thiz) in JNIMediaRecorderListener() argument 96 jclass clazz = env->GetObjectClass(thiz); in JNIMediaRecorderListener() 99 jniThrowException(env, "java/lang/Exception", NULL); in JNIMediaRecorderListener() 102 mClass = (jclass)env->NewGlobalRef(clazz); in JNIMediaRecorderListener() 106 mObject = env->NewGlobalRef(weak_thiz); in JNIMediaRecorderListener() 112 JNIEnv *env = AndroidRuntime::getJNIEnv(); in ~JNIMediaRecorderListener() local 113 env->DeleteGlobalRef(mObject); in ~JNIMediaRecorderListener() [all …]
|
D | android_media_MediaPlayer.cpp | 62 var = env->FindClass(className); \ 66 var = env->GetMethodID(clazz, fieldName, fieldDescriptor); \ 108 JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz); 117 JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz) in JNIMediaPlayerListener() argument 122 jclass clazz = env->GetObjectClass(thiz); in JNIMediaPlayerListener() 125 jniThrowException(env, "java/lang/Exception", NULL); in JNIMediaPlayerListener() 128 mClass = (jclass)env->NewGlobalRef(clazz); in JNIMediaPlayerListener() 132 mObject = env->NewGlobalRef(weak_thiz); in JNIMediaPlayerListener() 138 JNIEnv *env = AndroidRuntime::getJNIEnv(); in ~JNIMediaPlayerListener() local 139 env->DeleteGlobalRef(mObject); in ~JNIMediaPlayerListener() [all …]
|
D | android_media_MediaDrm.cpp | 54 var = env->FindClass(className); \ 58 var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \ 62 var = env->GetMethodID(clazz, fieldName, fieldDescriptor); \ 66 var = env->GetStaticFieldID(clazz, fieldName, fieldDescriptor); \ 70 var = env->GetStaticMethodID(clazz, fieldName, fieldDescriptor); \ 74 var = env->GetStaticObjectField(clazz, fieldId); \ 237 JNIEnv *env = AndroidRuntime::getJNIEnv(); in hidlVectorToJByteArray() local 239 jbyteArray result = env->NewByteArray(length); in hidlVectorToJByteArray() 241 env->SetByteArrayRegion(result, 0, length, reinterpret_cast<const jbyte *>(vector.data())); in hidlVectorToJByteArray() 246 jobject hidlLogMessagesToJavaList(JNIEnv *env, const Vector<drm::V1_4::LogMessage> &logs) { in hidlLogMessagesToJavaList() argument [all …]
|
D | android_media_tv_Tuner.cpp | 357 JNIEnv *env = android::AndroidRuntime::getJNIEnv(); in DestroyCallback() local 358 env->DeleteWeakGlobalRef(event->mLinearBlockObj); in DestroyCallback() 374 JNIEnv *env = AndroidRuntime::getJNIEnv(); in onEvent() local 375 ScopedLocalRef lnb(env, env->NewLocalRef(mLnbObj)); in onEvent() 376 if (!env->IsSameObject(lnb.get(), nullptr)) { in onEvent() 377 env->CallVoidMethod( in onEvent() 389 JNIEnv *env = AndroidRuntime::getJNIEnv(); in onDiseqcMessage() local 390 ScopedLocalRef lnb(env, env->NewLocalRef(mLnbObj)); in onDiseqcMessage() 391 if (!env->IsSameObject(lnb.get(), nullptr)) { in onDiseqcMessage() 392 ScopedLocalRef array(env, env->NewByteArray(diseqcMessage.size())); in onDiseqcMessage() [all …]
|
D | android_mtp_MtpServer.cpp | 52 static void initializeJavaIDs(JNIEnv* env) { in initializeJavaIDs() argument 55 std::call_once(sJniInitialized, [](JNIEnv *env) { in initializeJavaIDs() argument 56 const jclass storage_clazz = FindClassOrDie(env, "android/mtp/MtpStorage"); in initializeJavaIDs() 57 field_MtpStorage_storageId = GetFieldIDOrDie(env, storage_clazz, "mStorageId", "I"); in initializeJavaIDs() 59 GetFieldIDOrDie(env, storage_clazz, "mPath", "Ljava/lang/String;"); in initializeJavaIDs() 61 GetFieldIDOrDie(env, storage_clazz, "mDescription", "Ljava/lang/String;"); in initializeJavaIDs() 62 field_MtpStorage_removable = GetFieldIDOrDie(env, storage_clazz, "mRemovable", "Z"); in initializeJavaIDs() 63 field_MtpStorage_maxFileSize = GetFieldIDOrDie(env, storage_clazz, "mMaxFileSize", "J"); in initializeJavaIDs() 65 const jclass server_clazz = FindClassOrDie(env, "android/mtp/MtpServer"); in initializeJavaIDs() 66 field_MtpServer_nativeContext = GetFieldIDOrDie(env, server_clazz, "mNativeContext", "J"); in initializeJavaIDs() [all …]
|
D | android_media_Streams.cpp | 105 JNIEnv *env, jobjectArray keys, jobjectArray values, in ConvertKeyValueArraysToKeyedVector() argument 111 nKeyValuePairs = env->GetArrayLength(keys); in ConvertKeyValueArraysToKeyedVector() 112 failed = (nKeyValuePairs != env->GetArrayLength(values)); in ConvertKeyValueArraysToKeyedVector() 122 jniThrowException(env, "java/lang/IllegalArgumentException", NULL); in ConvertKeyValueArraysToKeyedVector() 129 jstring key = (jstring) env->GetObjectArrayElement(keys, i); in ConvertKeyValueArraysToKeyedVector() 130 jstring value = (jstring) env->GetObjectArrayElement(values, i); in ConvertKeyValueArraysToKeyedVector() 132 const char* keyStr = env->GetStringUTFChars(key, NULL); in ConvertKeyValueArraysToKeyedVector() 137 const char* valueStr = env->GetStringUTFChars(value, NULL); in ConvertKeyValueArraysToKeyedVector() 139 env->ReleaseStringUTFChars(key, keyStr); in ConvertKeyValueArraysToKeyedVector() 145 env->ReleaseStringUTFChars(key, keyStr); in ConvertKeyValueArraysToKeyedVector() [all …]
|
/frameworks/base/libs/hwui/jni/ |
D | Graphics.cpp | 33 JNIEnv* env; in getJNIEnv() local 34 if (mJavaVM->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { in getJNIEnv() 37 return env; in getJNIEnv() 43 JNIEnv* env = nullptr; in attachJNIEnv() local 45 int result = mJavaVM->AttachCurrentThread(&env, (void*) &args); in attachJNIEnv() 49 return env; in attachJNIEnv() 58 void doThrowNPE(JNIEnv* env) { in doThrowNPE() argument 59 jniThrowNullPointerException(env, NULL); in doThrowNPE() 62 void doThrowAIOOBE(JNIEnv* env) { in doThrowAIOOBE() argument 63 jniThrowException(env, "java/lang/ArrayIndexOutOfBoundsException", NULL); in doThrowAIOOBE() [all …]
|
/frameworks/base/drm/jni/ |
D | android_drm_DrmManagerClient.cpp | 47 static String8 getStringValue(JNIEnv* env, jobject object, const char* fieldName); 50 JNIEnv* env, jobject object, const char* fieldName, int* dataLength); 53 JNIEnv* env, jbyteArray byteArray, int* dataLength); 55 static String8 getStringValue(JNIEnv* env, jstring string); 57 static int getIntValue(JNIEnv* env, jobject object, const char* fieldName); 60 String8 Utility::getStringValue(JNIEnv* env, jobject object, const char* fieldName) { in getStringValue() argument 63 = env->GetFieldID(env->GetObjectClass(object), fieldName , "Ljava/lang/String;"); in getStringValue() 66 jstring valueString = (jstring) env->GetObjectField(object, fieldID); in getStringValue() 67 return Utility::getStringValue(env, valueString); in getStringValue() 74 String8 Utility::getStringValue(JNIEnv* env, jstring string) { in getStringValue() argument [all …]
|
/frameworks/base/services/core/jni/gnss/ |
D | GnssAntennaInfoCallback.cpp | 53 void GnssAntennaInfo_class_init_once(JNIEnv* env, jclass& clazz) { in GnssAntennaInfo_class_init_once() argument 54 method_reportAntennaInfo = env->GetMethodID(clazz, "reportAntennaInfo", "(Ljava/util/List;)V"); in GnssAntennaInfo_class_init_once() 55 jclass gnssAntennaInfoBuilder = env->FindClass("android/location/GnssAntennaInfo$Builder"); in GnssAntennaInfo_class_init_once() 56 class_gnssAntennaInfoBuilder = (jclass)env->NewGlobalRef(gnssAntennaInfoBuilder); in GnssAntennaInfo_class_init_once() 58 env->GetMethodID(class_gnssAntennaInfoBuilder, "<init>", "()V"); in GnssAntennaInfo_class_init_once() 60 env->GetMethodID(class_gnssAntennaInfoBuilder, "setCarrierFrequencyMHz", in GnssAntennaInfo_class_init_once() 63 env->GetMethodID(class_gnssAntennaInfoBuilder, "setPhaseCenterOffset", in GnssAntennaInfo_class_init_once() 67 env->GetMethodID(class_gnssAntennaInfoBuilder, "setPhaseCenterVariationCorrections", in GnssAntennaInfo_class_init_once() 71 env->GetMethodID(class_gnssAntennaInfoBuilder, "setSignalGainCorrections", in GnssAntennaInfo_class_init_once() 74 method_gnssAntennaInfoBuilderBuild = env->GetMethodID(class_gnssAntennaInfoBuilder, "build", in GnssAntennaInfo_class_init_once() [all …]
|
/frameworks/base/core/jni/ |
D | android_tracing_PerfettoDataSourceInstance.cpp | 55 void callJavaMethodWithArgsObject(JNIEnv* env, jobject classRef, jmethodID method, jobject args) { in callJavaMethodWithArgsObject() argument 56 ScopedLocalRef<jobject> localClassRef(env, env->NewLocalRef(classRef)); in callJavaMethodWithArgsObject() 63 env->CallVoidMethod(localClassRef.get(), method, args); in callJavaMethodWithArgsObject() 65 if (env->ExceptionCheck()) { in callJavaMethodWithArgsObject() 66 env->ExceptionDescribe(); in callJavaMethodWithArgsObject() 67 LOGE_EX(env); in callJavaMethodWithArgsObject() 68 env->ExceptionClear(); in callJavaMethodWithArgsObject() 72 PerfettoDataSourceInstance::PerfettoDataSourceInstance(JNIEnv* env, jobject javaDataSourceInstance, in PerfettoDataSourceInstance() argument 74 : inst_idx(inst_idx), mJavaDataSourceInstance(env->NewGlobalRef(javaDataSourceInstance)) {} in PerfettoDataSourceInstance() 77 JNIEnv* env = GetOrAttachJNIEnvironment(gVm, JNI_VERSION_1_6); in ~PerfettoDataSourceInstance() local [all …]
|
D | android_window_ScreenCapture.cpp | 72 static void checkAndClearException(JNIEnv* env, const char* methodName) { in checkAndClearException() argument 73 if (env->ExceptionCheck()) { in checkAndClearException() 75 env->ExceptionClear(); in checkAndClearException() 81 explicit ScreenCaptureListenerWrapper(JNIEnv* env, jobject jobject) { in ScreenCaptureListenerWrapper() argument 82 env->GetJavaVM(&mVm); in ScreenCaptureListenerWrapper() 83 mConsumerWeak = env->NewWeakGlobalRef(jobject); in ScreenCaptureListenerWrapper() 95 JNIEnv* env = getenv(); in onScreenCaptureCompleted() local 97 ScopedLocalRef<jobject> consumer{env, env->NewLocalRef(mConsumerWeak)}; in onScreenCaptureCompleted() 104 env->CallVoidMethod(consumer.get(), gConsumerClassInfo.accept, nullptr, in onScreenCaptureCompleted() 106 checkAndClearException(env, "accept"); in onScreenCaptureCompleted() [all …]
|
D | android_util_Binder.cpp | 178 static void gcIfManyNewRefs(JNIEnv* env) in gcIfManyNewRefs() argument 192 env->CallStaticVoidMethod(gBinderInternalOffsets.mClass, in gcIfManyNewRefs() 200 static JavaVM* jnienv_to_javavm(JNIEnv* env) in jnienv_to_javavm() argument 203 return env->GetJavaVM(&vm) >= 0 ? vm : NULL; in jnienv_to_javavm() 208 JNIEnv* env; in javavm_to_jnienv() local 209 return vm->GetEnv((void **)&env, JNI_VERSION_1_4) >= 0 ? env : NULL; in javavm_to_jnienv() 212 static const char* GetErrorTypeName(JNIEnv* env, jthrowable error) { in GetErrorTypeName() argument 213 if (env->IsInstanceOf(error, gErrorOffsets.mOutOfMemory)) { in GetErrorTypeName() 216 if (env->IsInstanceOf(error, gErrorOffsets.mStackOverflow)) { in GetErrorTypeName() 224 static void report_java_lang_error_fatal_error(JNIEnv* env, jthrowable error, in report_java_lang_error_fatal_error() argument [all …]
|
D | android_net_LocalSocketImpl.cpp | 57 socket_connect_local(JNIEnv *env, jobject object, in socket_connect_local() argument 64 jniThrowNullPointerException(env, NULL); in socket_connect_local() 68 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in socket_connect_local() 70 if (env->ExceptionCheck()) { in socket_connect_local() 74 ScopedUtfChars nameUtf8(env, name); in socket_connect_local() 83 jniThrowIOException(env, errno); in socket_connect_local() 95 socket_bind_local (JNIEnv *env, jobject object, jobject fileDescriptor, in socket_bind_local() argument 102 jniThrowNullPointerException(env, NULL); in socket_bind_local() 106 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in socket_bind_local() 108 if (env->ExceptionCheck()) { in socket_bind_local() [all …]
|
D | android_graphics_SurfaceTexture.cpp | 82 static void SurfaceTexture_setSurfaceTexture(JNIEnv* env, jobject thiz, in SurfaceTexture_setSurfaceTexture() argument 86 (SurfaceTexture*)env->GetLongField(thiz, fields.surfaceTexture); in SurfaceTexture_setSurfaceTexture() 93 env->SetLongField(thiz, fields.surfaceTexture, (jlong)surfaceTexture.get()); in SurfaceTexture_setSurfaceTexture() 96 static void SurfaceTexture_setProducer(JNIEnv* env, jobject thiz, in SurfaceTexture_setProducer() argument 100 (IGraphicBufferProducer*)env->GetLongField(thiz, fields.producer); in SurfaceTexture_setProducer() 107 env->SetLongField(thiz, fields.producer, (jlong)producer.get()); in SurfaceTexture_setProducer() 110 static void SurfaceTexture_setFrameAvailableListener(JNIEnv* env, in SurfaceTexture_setFrameAvailableListener() argument 115 env->GetLongField(thiz, fields.frameAvailableListener); in SurfaceTexture_setFrameAvailableListener() 122 env->SetLongField(thiz, fields.frameAvailableListener, (jlong)listener.get()); in SurfaceTexture_setFrameAvailableListener() 125 sp<SurfaceTexture> SurfaceTexture_getSurfaceTexture(JNIEnv* env, jobject thiz) { in SurfaceTexture_getSurfaceTexture() argument [all …]
|
D | android_media_MicrophoneInfo.cpp | 51 jint convertMicrophoneInfoFromNative(JNIEnv *env, jobject *jMicrophoneInfo, in convertMicrophoneInfoFromNative() argument 72 jDeviceId = env->NewStringUTF(micInfo.device_id); in convertMicrophoneInfoFromNative() 73 jAddress = env->NewStringUTF(micInfo.address); in convertMicrophoneInfoFromNative() 75 env->NewObject(gMicrophoneInfoCoordinateClass, gMicrophoneInfoCoordinateCstor, in convertMicrophoneInfoFromNative() 79 env->NewObject(gMicrophoneInfoCoordinateClass, gMicrophoneInfoCoordinateCstor, in convertMicrophoneInfoFromNative() 82 jFrequencyResponses = env->NewObject(gArrayListClass, gArrayListCstor); in convertMicrophoneInfoFromNative() 85 env->NewObject(gFloatClass, gFloatCstor, micInfo.frequency_responses[0][i]); in convertMicrophoneInfoFromNative() 87 env->NewObject(gFloatClass, gFloatCstor, micInfo.frequency_responses[1][i]); in convertMicrophoneInfoFromNative() 88 jobject jFrequencyResponse = env->NewObject(gPairClass, gPairCstor, jFrequency, jResponse); in convertMicrophoneInfoFromNative() 89 env->CallBooleanMethod(jFrequencyResponses, gArrayListMethods.add, jFrequencyResponse); in convertMicrophoneInfoFromNative() [all …]
|
D | android_window_WindowInfosListener.cpp | 56 jobject fromDisplayInfo(JNIEnv* env, gui::DisplayInfo displayInfo) { in fromDisplayInfo() argument 61 ScopedLocalRef<jobject> matrixObj(env, AMatrix_newInstance(env, transformValues)); in fromDisplayInfo() 62 return env->NewObject(gDisplayInfoClassInfo.clazz, gDisplayInfoClassInfo.ctor, in fromDisplayInfo() 67 static jobjectArray fromWindowInfos(JNIEnv* env, const std::vector<WindowInfo>& windowInfos) { in fromWindowInfos() argument 69 env->NewObjectArray(windowInfos.size(), gInputWindowHandleClass, nullptr); in fromWindowInfos() 72 jWindowHandle(env, in fromWindowInfos() 73 android_view_InputWindowHandle_fromWindowInfo(env, windowInfos[i])); in fromWindowInfos() 74 env->SetObjectArrayElement(jWindowHandlesArray, i, jWindowHandle.get()); in fromWindowInfos() 80 static jobjectArray fromDisplayInfos(JNIEnv* env, const std::vector<DisplayInfo>& displayInfos) { in fromDisplayInfos() argument 82 env->NewObjectArray(displayInfos.size(), gDisplayInfoClassInfo.clazz, nullptr); in fromDisplayInfos() [all …]
|
/frameworks/base/core/tests/coretests/jni/ |
D | NativePowerManagerTest.cpp | 62 static jobject nativeObtainPowerSaveStateParcel(JNIEnv* env, jobject /* obj */, in nativeObtainPowerSaveStateParcel() argument 70 jobject psParcel = nativeObtainParcel(env); in nativeObtainPowerSaveStateParcel() 71 Parcel* parcel = nativeGetParcelData(env, psParcel); in nativeObtainPowerSaveStateParcel() 74 jniThrowException(env, "java/lang/IllegalArgumentException", in nativeObtainPowerSaveStateParcel() 81 static void nativeUnparcelAndVerifyPowerSaveState(JNIEnv* env, jobject /* obj */, jobject psParcel, in nativeUnparcelAndVerifyPowerSaveState() argument 85 Parcel* parcel = nativeGetParcelData(env, psParcel); in nativeUnparcelAndVerifyPowerSaveState() 99 jniThrowException(env, "java/lang/IllegalArgumentException", in nativeUnparcelAndVerifyPowerSaveState() 104 static jobject nativeObtainBSPConfigParcel(JNIEnv* env, jobject /* obj */, in nativeObtainBSPConfigParcel() argument 107 for (jint i = 0; i < env->GetArrayLength(keyArray); i++) { in nativeObtainBSPConfigParcel() 108 jstring keyString = (jstring) (env->GetObjectArrayElement(keyArray, i)); in nativeObtainBSPConfigParcel() [all …]
|
/frameworks/base/libs/hwui/apex/ |
D | LayoutlibLoader.cpp | 31 extern int register_android_graphics_ByteBufferStreamAdaptor(JNIEnv* env); 32 extern int register_android_graphics_Camera(JNIEnv* env); 33 extern int register_android_graphics_CreateJavaOutputStreamAdaptor(JNIEnv* env); 34 extern int register_android_graphics_Graphics(JNIEnv* env); 36 extern int register_android_graphics_Interpolator(JNIEnv* env); 37 extern int register_android_graphics_MaskFilter(JNIEnv* env); 39 extern int register_android_graphics_PathEffect(JNIEnv* env); 40 extern int register_android_graphics_Shader(JNIEnv* env); 41 extern int register_android_graphics_RenderEffect(JNIEnv* env); 42 extern int register_android_graphics_Typeface(JNIEnv* env); [all …]
|
D | jni_runtime.cpp | 31 extern int register_android_graphics_ByteBufferStreamAdaptor(JNIEnv* env); 32 extern int register_android_graphics_Camera(JNIEnv* env); 33 extern int register_android_graphics_CreateJavaOutputStreamAdaptor(JNIEnv* env); 34 extern int register_android_graphics_Graphics(JNIEnv* env); 37 extern int register_android_graphics_Interpolator(JNIEnv* env); 38 extern int register_android_graphics_MaskFilter(JNIEnv* env); 39 extern int register_android_graphics_Movie(JNIEnv* env); 41 extern int register_android_graphics_PathEffect(JNIEnv* env); 42 extern int register_android_graphics_Shader(JNIEnv* env); 43 extern int register_android_graphics_RenderEffect(JNIEnv* env); [all …]
|
/frameworks/base/services/core/jni/BroadcastRadio/ |
D | convert.cpp | 58 static JavaRef<jobject> BandDescriptorFromHal(JNIEnv *env, const RegionalBandConfig &config); 59 static JavaRef<jobject> BandDescriptorFromHal(JNIEnv *env, const V1_0::BandConfig &config, Region r… 166 static jstring CastToString(JNIEnv *env, jobject obj) { in CastToString() argument 167 if (env->IsInstanceOf(obj, gjni.String.clazz)) { in CastToString() 176 bool ThrowIfFailed(JNIEnv *env, const hardware::Return<void> &hidlResult) { in ThrowIfFailed() argument 177 return __ThrowIfFailedHidl(env, hidlResult); in ThrowIfFailed() 180 bool __ThrowIfFailedHidl(JNIEnv *env, const hardware::details::return_status &hidlResult) { in __ThrowIfFailedHidl() argument 183 ThrowParcelableRuntimeException(env, "HIDL call failed: " + hidlResult.description()); in __ThrowIfFailedHidl() 187 bool __ThrowIfFailed(JNIEnv *env, const Result halResult) { in __ThrowIfFailed() argument 192 ThrowParcelableRuntimeException(env, "Result::NOT_INITIALIZED"); in __ThrowIfFailed() [all …]
|
/frameworks/base/services/core/jni/ |
D | com_android_server_powerstats_PowerStatsService.cpp | 130 static jobjectArray nativeGetPowerEntityInfo(JNIEnv *env, jclass clazz) { in nativeGetPowerEntityInfo() argument 140 [&env, &powerEntityArray](auto infos, auto status) { in nativeGetPowerEntityInfo() 144 powerEntityArray = env->NewObjectArray(infos.size(), class_PE, nullptr); in nativeGetPowerEntityInfo() 146 jstring name = env->NewStringUTF(infos[i].powerEntityName.c_str()); in nativeGetPowerEntityInfo() 147 jobject powerEntity = env->NewObject(class_PE, method_PE_init); in nativeGetPowerEntityInfo() 148 env->SetIntField(powerEntity, field_PE_id, infos[i].powerEntityId); in nativeGetPowerEntityInfo() 149 env->SetObjectField(powerEntity, field_PE_name, name); in nativeGetPowerEntityInfo() 150 env->SetObjectArrayElement(powerEntityArray, i, powerEntity); in nativeGetPowerEntityInfo() 151 env->DeleteLocalRef(name); in nativeGetPowerEntityInfo() 152 env->DeleteLocalRef(powerEntity); in nativeGetPowerEntityInfo() [all …]
|
/frameworks/base/core/jni/platform/host/ |
D | HostRuntime.cpp | 58 extern int register_android_os_Binder(JNIEnv* env); 59 extern int register_libcore_util_NativeAllocationRegistry_Delegate(JNIEnv* env); 76 int register_libcore_util_NativeAllocationRegistry_Delegate(JNIEnv* env) { in register_libcore_util_NativeAllocationRegistry_Delegate() argument 77 return jniRegisterNativeMethods(env, "libcore/util/NativeAllocationRegistry_Delegate", gMethods, in register_libcore_util_NativeAllocationRegistry_Delegate() 83 extern int register_android_animation_PropertyValuesHolder(JNIEnv* env); 84 extern int register_android_content_AssetManager(JNIEnv* env); 85 extern int register_android_content_StringBlock(JNIEnv* env); 86 extern int register_android_content_XmlBlock(JNIEnv* env); 87 extern int register_android_content_res_ApkAssets(JNIEnv* env); 88 extern int register_android_database_CursorWindow(JNIEnv* env); [all …]
|
/frameworks/base/media/mca/filterfw/jni/ |
D | jni_util.cpp | 35 JavaObject::JavaObject(jobject object, JNIEnv* env) 39 object_ = env->NewGlobalRef(object_); 66 JNIEnv* env = GetCurrentJNIEnv(); 67 if (!env) 70 env->DeleteGlobalRef(object_); 91 JNIEnv* env = NULL; 92 const jint result = vm->GetEnv(reinterpret_cast<void**>(&env), 94 return result == JNI_OK ? env : NULL; 98 jstring ToJString(JNIEnv* env, const std::string& value) { in ToJString() argument 99 return env->NewStringUTF(value.c_str()); in ToJString() [all …]
|