Skip to content

Commit 150fe4c

Browse files
Merge branch 'master' into brd4350a_support_
2 parents b62d433 + f957643 commit 150fe4c

File tree

33 files changed

+1589
-400
lines changed

33 files changed

+1589
-400
lines changed

.github/workflows/full-android.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
name: Run
3434

3535
env:
36-
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/
36+
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64/
3737

3838
runs-on: ubuntu-latest
3939
if: github.actor != 'restyled-io[bot]'
4040

4141
container:
42-
image: ghcr.io/project-chip/chip-build-android:104
42+
image: ghcr.io/project-chip/chip-build-android:106
4343
volumes:
4444
- "/tmp/log_output:/tmp/test_logs"
4545

.github/workflows/smoketest-android.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
name: Smoke Run - Android
3232

3333
env:
34-
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/
34+
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64/
3535

3636
runs-on: ubuntu-latest
3737
if: github.actor != 'restyled-io[bot]'
3838

3939
container:
40-
image: ghcr.io/project-chip/chip-build-android:98
40+
image: ghcr.io/project-chip/chip-build-android:106
4141
volumes:
4242
- "/:/runner-root-volume"
4343
- "/tmp/log_output:/tmp/test_logs"

examples/android/CHIPTest/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = "1.8.10"
3+
ext.kotlin_version = "2.0.0"
44
repositories {
55
google()
66
mavenCentral()
77
}
88
dependencies {
9-
classpath "com.android.tools.build:gradle:4.2.2"
9+
classpath "com.android.tools.build:gradle:7.1.3"
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111

1212
// NOTE: Do not place your application dependencies here; they belong

examples/android/CHIPTest/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
9+
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Aug 16 17:10:29 CST 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

examples/android/CHIPTool/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = '1.8.10'
3+
ext.kotlin_version = '2.0.0'
44
repositories {
55
google()
66
mavenCentral()
77
}
88
dependencies {
9-
classpath "com.android.tools.build:gradle:4.2.0"
9+
classpath "com.android.tools.build:gradle:7.1.3"
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111

1212
// NOTE: Do not place your application dependencies here; they belong

examples/android/CHIPTool/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
9+
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

examples/chef/common/stubs.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,11 @@ void emberAfWakeOnLanClusterInitCallback(EndpointId endpoint)
336336

337337
void ApplicationInit()
338338
{
339-
ChipLogProgress(NotSpecified, "Chef Application Init !!!")
339+
ChipLogProgress(NotSpecified, "Chef Application Init !!!");
340340

341341
#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER
342-
// set Parent Endpoint and Composition Type for an Endpoint
343-
EndpointId kRefEndpointId = 1;
342+
// set Parent Endpoint and Composition Type for an Endpoint
343+
EndpointId kRefEndpointId = 1;
344344
EndpointId kColdCabinetEndpointId = 2;
345345
EndpointId kFreezeCabinetEndpointId = 3;
346346
SetTreeCompositionForEndpoint(kRefEndpointId);
@@ -354,7 +354,7 @@ void ApplicationInit()
354354

355355
void ApplicationShutdown()
356356
{
357-
ChipLogProgress(NotSpecified, "Chef Application Down !!!")
357+
ChipLogProgress(NotSpecified, "Chef Application Down !!!");
358358
}
359359

360360
// No-op function, used to force linking this file,

examples/tv-app/android/App/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = '1.9.20'
3+
ext.kotlin_version = '2.0.0'
44
repositories {
55
google()
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.2.2'
9+
classpath 'com.android.tools.build:gradle:7.1.3'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files

examples/tv-app/android/App/gradle.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
9+
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@@ -24,4 +24,3 @@ matterSdkSourceBuild=false
2424
# example) to build SDK from source code and debug in Android Studio.
2525
# Set to blank to use the SDK prebuilt by scripts/build/build_examples.py.
2626
matterBuildSrcDir=out/android-arm64-chip-tvserver
27-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Oct 26 11:10:18 CST 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

examples/tv-casting-app/android/App/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:4.2.2'
8+
classpath 'com.android.tools.build:gradle:7.1.3'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files

examples/tv-casting-app/android/App/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
9+
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
106 : Upgrade android docker with java 17 and adjust the location for android cmdline tool
1+
107 : Tizen - do not mix snapshot and Tizen 8.0 release

integrations/docker/images/stage-2/chip-build-tizen/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh
77
RUN set -x \
88
&& apt-get update \
99
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
10+
7zip \
1011
cpio \
1112
libncurses6 \
12-
obs-build \
1313
openjdk-8-jre-headless \
1414
wget \
1515
zip \

integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh

+46-31
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SECRET_TOOL=false
2626

2727
SCRIPT_NAME=$(basename -- "$(readlink -f "${BASH_SOURCE:?}")")
2828
SCRIPT_DIR=$(dirname -- "$(readlink -f "${BASH_SOURCE:?}")")
29-
DEPENDENCIES=('cpio' 'openjdk-8-jre-headless' 'obs-build' 'wget' 'zip')
29+
DEPENDENCIES=('7zip' 'cpio' 'openjdk-8-jre-headless' 'wget' 'zip')
3030

3131
# If color is available use colors
3232
if which tput >/dev/null 2>&1 && [[ $(tput -T $TERM colors) -ge 8 ]]; then
@@ -45,16 +45,18 @@ function show_help() {
4545
echo
4646
echo "Options:"
4747
echo " -h, --help Display this information"
48-
echo " --tizen-sdk-path Set directory where Tizen will be installed. Default is $TIZEN_SDK_ROOT"
49-
echo " --tizen-sdk-data-path Set directory where Tizen have data. Default is $TIZEN_SDK_DATA_PATH"
50-
echo " --install-dependencies This options install all dependencies."
48+
echo " --tizen-sdk-path Set directory for Tizen SDK installation. Default is $TIZEN_SDK_ROOT"
49+
echo " --tizen-sdk-data-path Set directory for Tizen SDK runtime data. Default is $TIZEN_SDK_DATA_PATH"
50+
echo " --install-dependencies This option installs all required dependencies"
5151
echo " --tizen-version Select Tizen version. Default is $TIZEN_VERSION"
52-
echo " --override-secret-tool Circumvent the requirement of having functional D-Bus Secrets service."
52+
echo " --override-secret-tool Circumvent the requirement of having functional D-Bus Secrets service"
5353
echo
5454
echo "Note:"
55-
echo "The script should run fully with ubuntu. For other distributions you may have to manually"
56-
echo "install all needed dependencies. Use the script specifying --tizen-sdk-path with or"
57-
echo "without --tizen-version. The script will only install Tizen platform for Matter."
55+
echo "This script does not install full Tizen SDK. It installs only the necessary"
56+
echo "parts for Matter SDK to be able to build Tizen applications."
57+
echo "The option '--install-dependencies' should be able to install all required"
58+
echo "dependencies on any Debian-based distribution. For other distributions the"
59+
echo "dependencies should be installed manually."
5860
}
5961

6062
# ------------------------------------------------------------------------------
@@ -78,12 +80,12 @@ function warning() {
7880
# ------------------------------------------------------------------------------
7981
# Show dependencies
8082
function show_dependencies() {
81-
warning "Need dependencies for use this script installation SDK: cpio unrpm unzip wget"
82-
warning "Need dependencies for Tizen SDK: JAVA JRE >=8.0"
83+
warning "Required dependencies for Tizen SDK installation: 7z cpio unzip wget"
84+
warning "Required dependencies for Tizen SDK: JAVA JRE >=8.0"
8385
}
8486

8587
# ------------------------------------------------------------------------------
86-
# Function helper massive download
88+
# Helper function for downloading packages.
8789
# Usage: download "url_dir_package" ${package_array[@]}
8890
function download() {
8991
echo "$COLOR_BLUE"
@@ -92,6 +94,10 @@ function download() {
9294
for PKG in "${@:2}"; do
9395
PKGS+=("-A" "$PKG")
9496
done
97+
98+
# Skip downloading if no packages are specified
99+
[[ ${#PKGS[@]} -eq 0 ]] && return
100+
95101
wget -r -nd --no-parent -e robots=off --progress=dot:mega "${PKGS[@]}" "$1"
96102

97103
# Check if the files have been downloaded
@@ -106,7 +112,7 @@ function download() {
106112
}
107113

108114
# ------------------------------------------------------------------------------
109-
# Function install all dependencies.
115+
# Function for installing all dependencies.
110116
function install_dependencies() {
111117
if ! command -v apt-get &>/dev/null; then
112118
show_dependencies
@@ -120,13 +126,22 @@ function install_dependencies() {
120126
}
121127

122128
# ------------------------------------------------------------------------------
123-
# Function clean on EXIT
129+
# Function for unpacking RPM packages.
130+
function unrpm() {
131+
for PKG in "${@}"; do
132+
echo "Extracting $PKG..."
133+
7z x -so "$PKG" | cpio -idmv
134+
done
135+
}
136+
137+
# ------------------------------------------------------------------------------
138+
# Function for cleaning up temporary files on exit.
124139
function cleanup() {
125140
rm -rf "${TMP_DIR:?}"
126141
}
127142

128143
# ------------------------------------------------------------------------------
129-
# Function install tizen sdk.
144+
# Function for installing Tizen SDK.
130145
function install_tizen_sdk() {
131146

132147
mkdir -p "$TIZEN_SDK_ROOT" || return
@@ -194,9 +209,17 @@ function install_tizen_sdk() {
194209
'app-core-common-*.rpm'
195210
'aul-0*.armv7l.rpm'
196211
'aul-devel-*.armv7l.rpm'
212+
'bluetooth-frwk-0*.armv7l.rpm'
197213
'bundle-0*.armv7l.rpm'
198214
'bundle-devel-*.armv7l.rpm'
199215
'buxton2-*.armv7l.rpm'
216+
'capi-network-bluetooth-0*.armv7l.rpm'
217+
'capi-network-bluetooth-devel-*.armv7l.rpm'
218+
'capi-network-nsd-*.armv7l.rpm'
219+
'capi-network-thread-*.armv7l.rpm'
220+
'capi-system-peripheral-io-*.armv7l.rpm'
221+
'capi-system-peripheral-io-devel-*.armv7l.rpm'
222+
'capi-system-resource-1*.armv7l.rpm'
200223
'cynara-devel-*.armv7l.rpm'
201224
'dbus-1*.armv7l.rpm'
202225
'dbus-devel-*.armv7l.rpm'
@@ -209,12 +232,14 @@ function install_tizen_sdk() {
209232
'libcynara-commons-*.armv7l.rpm'
210233
'libdns_sd-*.armv7l.rpm'
211234
'libjson-glib-*.armv7l.rpm'
235+
'libnsd-dns-sd-*.armv7l.rpm'
212236
'libsessiond-0*.armv7l.rpm'
213237
'libsystemd-*.armv7l.rpm'
214238
'libtzplatform-config-*.armv7l.rpm'
215239
'parcel-0*.armv7l.rpm'
216240
'parcel-devel-*.armv7l.rpm'
217241
'pkgmgr-info-*.armv7l.rpm'
242+
'sensord-*.armv7l.rpm'
218243
'sensord-devel-*.armv7l.rpm'
219244
'sensord-dummy-*.armv7l.rpm'
220245
'vconf-compat-*.armv7l.rpm'
@@ -223,22 +248,13 @@ function install_tizen_sdk() {
223248

224249
# Unified packages (snapshots)
225250
URL="http://download.tizen.org/snapshots/TIZEN/Tizen/Tizen-Unified/latest/repos/standard/packages/armv7l/"
226-
PKG_ARR=(
227-
'bluetooth-frwk-0*.armv7l.rpm'
228-
'capi-network-bluetooth-0*.armv7l.rpm'
229-
'capi-network-bluetooth-devel-*.armv7l.rpm'
230-
'capi-network-nsd-*.armv7l.rpm'
231-
'capi-network-thread-*.armv7l.rpm'
232-
'capi-system-peripheral-io-*.armv7l.rpm'
233-
'capi-system-peripheral-io-devel-*.armv7l.rpm'
234-
'capi-system-resource-1*.armv7l.rpm'
235-
'libnsd-dns-sd-*.armv7l.rpm'
236-
'sensord-*.armv7l.rpm')
251+
PKG_ARR=()
237252
download "$URL" "${PKG_ARR[@]}"
238253

239254
# Tizen Developer Platform Certificate
240255
URL="http://download.tizen.org/sdk/extensions/Tizen_IoT_Headless/binary/"
241-
# Tizen site do not has this package available in version 8.0. Certificates are the same for 7.0 and 8.0.
256+
# Tizen site does not have this package available in version 8.0.
257+
# Certificates are the same for 7.0 and 8.0, though.
242258
PKG_ARR=(
243259
"7.0-iot-things-add-ons_*_ubuntu-64.zip")
244260
download "$URL" "${PKG_ARR[@]}"
@@ -255,8 +271,7 @@ function install_tizen_sdk() {
255271
# Install secret tool or not
256272
if ("$SECRET_TOOL"); then
257273
info "Overriding secret tool..."
258-
cp "$SCRIPT_DIR/secret-tool.py" "$TIZEN_SDK_ROOT/tools/certificate-encryptor/secret-tool"
259-
chmod 0755 "$TIZEN_SDK_ROOT/tools/certificate-encryptor/secret-tool"
274+
install "$SCRIPT_DIR/secret-tool.py" "$TIZEN_SDK_ROOT/tools/certificate-encryptor/secret-tool"
260275
fi
261276

262277
# Configure Tizen CLI
@@ -331,16 +346,16 @@ info "Created tmp directory $TMP_DIR"
331346
# Checks if the user need install dependencies
332347
if [ "$INSTALL_DEPENDENCIES" = true ]; then
333348
if ! install_dependencies; then
334-
error "Cannot install dependencies, please use this script as sudo user or root. Use --help"
349+
error "Cannot install dependencies, please use this script as sudo user or root."
335350
show_dependencies
336351
exit 1
337352
fi
338353
fi
339354

340355
# ------------------------------------------------------------------------------
341356
# Checking dependencies needed to install Tizen platform
342-
info "Checking required tools: cpio, java, unrpm, unzip, wget"
343-
for PKG in 'cpio' 'java' 'unrpm' 'unzip' 'wget'; do
357+
info "Checking required tools: 7z, cpio, java, unzip, wget"
358+
for PKG in '7z' 'cpio' 'java' 'unzip' 'wget'; do
344359
if ! command -v "$PKG" &>/dev/null; then
345360
error "Required tool not found: $PKG"
346361
dep_lost=1

src/app/data-model-provider/Provider.h

+9-6
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,17 @@ class Provider : public ProviderMetadataTree
8686
/// - returning a value other than Success implies an error reply (error and data are mutually exclusive)
8787
///
8888
/// Preconditions:
89-
/// - `request.path` MUST be valid: Invoke` is only guaranteed to function correctly for
90-
/// VALID paths (i.e. use `ProviderMetadataTree::AcceptedCommands` to check). This is
91-
/// because we assume ACL or flags (like timed invoke) have to happen before invoking
92-
/// this command.
89+
/// - `request.path` MUST refer to a command that actually exists. This is because in practice
90+
/// callers must do ACL and flag checks (e.g. for timed invoke) before calling this function.
91+
///
92+
/// Callers that do not care about those checks should use `ProviderMetadataTree::AcceptedCommands`
93+
/// to check for command existence.
94+
///
9395
/// - TODO: as interfaces are updated, we may want to make the above requirement more
9496
/// relaxed, as it seems desirable for users of this interface to have guaranteed
95-
/// behavior (like error on invalid paths) where as today this seems unclear as some
96-
/// command intercepts do not validate if the path is valid per endpoints.
97+
/// behavior (like error on invalid paths) whereas today this seems unclear as some
98+
/// command intercepts do not validate that the command is in fact accepted on the
99+
/// endpoint provided.
97100
///
98101
/// Return value expectations:
99102
/// - if a response has been placed into `handler` then std::nullopt MUST be returned. In particular

0 commit comments

Comments
 (0)