From 6f5d66f3f8ee79c2be8625db941118f745673f86 Mon Sep 17 00:00:00 2001 From: zeng li Date: Sat, 11 May 2024 17:09:46 +0800 Subject: [PATCH] Fix crash in android tv-app when handling level commands --- examples/tv-app/android/java/LevelManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/tv-app/android/java/LevelManager.cpp b/examples/tv-app/android/java/LevelManager.cpp index 4fc392dca01314..873c2e91ebb321 100644 --- a/examples/tv-app/android/java/LevelManager.cpp +++ b/examples/tv-app/android/java/LevelManager.cpp @@ -83,6 +83,7 @@ void LevelManager::PostLevelChanged(chip::EndpointId endpoint, uint8_t value) jboolean LevelManager::SetLevel(jint endpoint, jint value) { + chip::DeviceLayer::StackLock stack; chip::Protocols::InteractionModel::Status status = app::Clusters::LevelControl::Attributes::CurrentLevel::Set( static_cast(endpoint), static_cast(value)); return status == chip::Protocols::InteractionModel::Status::Success;