Skip to content

Commit

Permalink
Merge branch 'master' into matter_b93
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 authored Feb 1, 2024
2 parents 18c21fb + cfd1551 commit c29a7a6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ source_set("paths") {
source_set("global-attributes") {
sources = [ "GlobalAttributes.h" ]

# This also depends on zap-generated code which is currently impossible to split outs
public_deps = [ "${chip_root}/src/lib/support" ]
# This also depends on zap-generated code which is currently impossible to split out
# as a dependency
public_deps = [
":app_config",
"${chip_root}/src/lib/support",
]
}

source_set("pre-encoded-value") {
Expand Down
1 change: 1 addition & 0 deletions src/app/GlobalAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include <app-common/zap-generated/ids/Attributes.h>
#include <app/AppConfig.h>
#include <lib/support/CodeUtils.h>

namespace chip {
Expand Down
2 changes: 2 additions & 0 deletions src/ble/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ if (chip_config_network_layer_ble) {
"BleError.h",
"BleLayer.cpp",
"BleLayer.h",
"BleLayerDelegate.h",
"BlePlatformDelegate.h",
"BleRole.h",
"BleUUID.cpp",
"BleUUID.h",
"BtpEngine.cpp",
Expand Down
9 changes: 7 additions & 2 deletions src/lib/support/JniTypeWrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,14 @@ class JniGlobalRefWrapper
class JniLocalReferenceManager
{
public:
JniLocalReferenceManager(JNIEnv * env) : mEnv(env)
explicit JniLocalReferenceManager(JNIEnv * env) : mEnv(env)
{
if (mEnv->PushLocalFrame(JNI_LOCAL_REF_COUNT) == 0)
{
mlocalFramePushed = true;
}
}

~JniLocalReferenceManager()
{
if (mlocalFramePushed)
Expand All @@ -202,8 +203,12 @@ class JniLocalReferenceManager
}
}

// Delete copy constructor and copy assignment operator
JniLocalReferenceManager(const JniLocalReferenceManager &) = delete;
JniLocalReferenceManager & operator=(const JniLocalReferenceManager &) = delete;

private:
JNIEnv * mEnv = nullptr;
JNIEnv * const mEnv;
bool mlocalFramePushed = false;
};

Expand Down

0 comments on commit c29a7a6

Please sign in to comment.