@@ -138,7 +138,6 @@ jobject GetNodeStateObj(JNIEnv * env, const char * nodeStateClassSignature, jobj
138
138
JniReferences::GetInstance ().FindMethod (env, wrapperCallback, " getNodeState" , nodeStateClassSignature, &getNodeStateMethod);
139
139
VerifyOrReturnValue (err == CHIP_NO_ERROR, nullptr , ChipLogError (Controller, " Could not find getNodeState method" ));
140
140
141
- DeviceLayer::StackUnlock unlock;
142
141
jobject ret = env->CallObjectMethod (wrapperCallback, getNodeStateMethod);
143
142
VerifyOrReturnValue (!env->ExceptionCheck (), nullptr , env->ExceptionDescribe ());
144
143
@@ -270,6 +269,7 @@ CHIP_ERROR ConvertReportTlvToJson(const uint32_t id, TLV::TLVReader & data, std:
270
269
void ReportCallback::OnAttributeData (const app::ConcreteDataAttributePath & aPath, TLV::TLVReader * apData,
271
270
const app::StatusIB & aStatus)
272
271
{
272
+ DeviceLayer::StackUnlock unlock;
273
273
CHIP_ERROR err = CHIP_NO_ERROR;
274
274
JNIEnv * env = JniReferences::GetInstance ().GetEnvForCurrentThread ();
275
275
VerifyOrReturn (env != nullptr , ChipLogError (Controller, " Could not get JNIEnv for current thread" ));
@@ -408,6 +408,7 @@ void ReportCallback::UpdateClusterDataVersion()
408
408
409
409
void ReportCallback::OnEventData (const app::EventHeader & aEventHeader, TLV::TLVReader * apData, const app::StatusIB * apStatus)
410
410
{
411
+ DeviceLayer::StackUnlock unlock;
411
412
CHIP_ERROR err = CHIP_NO_ERROR;
412
413
JNIEnv * env = JniReferences::GetInstance ().GetEnvForCurrentThread ();
413
414
VerifyOrReturn (env != nullptr , ChipLogError (Controller, " Could not get JNIEnv for current thread" ));
@@ -642,7 +643,6 @@ void ReportCallback::ReportError(const app::ConcreteAttributePath * attributePat
642
643
eventClusterId = static_cast <jlong>(eventPath->mClusterId );
643
644
eventId = static_cast <jlong>(eventPath->mEventId );
644
645
}
645
-
646
646
env->CallVoidMethod (wrapperCallback, onErrorMethod, isAttributePath, attributeEndpointId, attributeClusterId, attributeId,
647
647
isEventPath, eventEndpointId, eventClusterId, eventId, exception );
648
648
VerifyOrReturn (!env->ExceptionCheck (), env->ExceptionDescribe ());
0 commit comments