Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync the codelab branch with v2.0.0 #201

Merged
merged 78 commits into from
Feb 7, 2024

Conversation

pierredelisle
Copy link
Contributor

No description provided.

mauimauer and others added 30 commits September 20, 2022 11:15
Swap order of deviceId & vendorID for correct display in DeviceFragment.kt
The native library doesn't like ipAddresses containing interface suffixes such as "fe80::1252:1cff:fe62:b430%wlan0"
The native library doesn't like ipAddresses containing interface suffixes such as "fe80::1252:1cff:fe62:b430%wlan0"
Added reference link to comment
Sanitize ipAddress before passing it to native lib.
…ilding the CommissioningRequest. (#18)

Fix compile issue introduced in PR #17.
Added a test to make sure it works this time :-).
…or codelab code. (#21)

Sections markers for codelab sections are identified as follows:
Beginning of codelab section:
  // CODELAB: <section info>
End of codelab section:
  // CODELAB SECTION END

Thanks to these codelab section markers, we can run the script tools/process-codelab-source-files.sh (which calls tools/process-codelab-source-file.py) to easily update the codelab branch so it only has the codelab comment without the actual code.
* Release 1.1.0.
Sync matterhorn with Matter SDK at commit d47c8f7a3ac84f2cc04e5411f064baeb9fe8c93f.
REL5 for EAP partners.

* Release 1.1.0.
Sync matterhorn with Matter SDK at commit d47c8f7a3ac84f2cc04e5411f064baeb9fe8c93f.
REL5 for EAP partners.

* Release 1.1.0.
Sync matterhorn with Matter SDK at commit d47c8f7a3ac84f2cc04e5411f064baeb9fe8c93f.
REL5 for EAP partners.
Fix issue #24.
Sync matterhorn with Matter SDK at commit 0b9cae0209263edef812f4df45a4d2035c092688.
Prefix GHSAFM now added to the tag. Makes it easier to navigate through logs and quickly spot GHSAFM log entries when investigating issues that involve both the Mobile SDK and the Matter SDK.
Ran ktfmt to cleanup formatting in all our files.
ktfmt should be run whenever a PR is sent.
No code changes done besides formatting.
* Fixes for proper error handling on calls to the Matter SDK.

- Replaced call to chipController.openPairingWindowWithPin with openPairingWindowWithPinCallback. The former did support callback via setCompletionListener().
- Wait for successful completion of "openPairingWindow" before calling the GPS shareDevice() API.
- Cleaned up logs with a standardized "ShareDevice: " prefix for all multi-admin related log messages.
- Fixed error handling and processing of the shareDevice Status LiveData.
- Fixed typo in HomeViewModel: "com.google.android.gms.home.matter.EXTRA_DEVICE_TYPE" (was "com.google.android.gms.home.matter.EXTRA_DEVICE_TYPE").

* Adds support for a "Background Work" alert dialog to keep user informed that background work is being performed.

* Adds support for setting the device name after it has been commissioned.
- Augment logging.
- Fix how we disable periodic ping with value -1.
These fixes help with investigation of issues
- Augment logging.
- Fix how we disable periodic ping with value -1.
- Support EXTRA_COMMISSIONING_WINDOW_EXPIRATION when called as the target of multi-admin.
Properly handle possible error conditions in CompletionListener.
- Markers "// CODELAB FEATURED BEGIN" and "// CODELAB FEATURED END" now used to identify code blocks that are featured in the codelab. Not to be consused with marker "// CODELAB: <section> which identifies code that is filled in when doing the codelab.
- HomeViewModel: Refactored commissionDevice() into commissionDevice() (for true first time commissionning of a device) and multiadminCommissioning() (for commissionning of a device via multi-admin).
- Improved docs to better relate to the 5 steps of the commissioning and sharing flows.
- align code with codelab documentation.
- Use APP_NAME as log prefix (e.g. GHSAFM and GHSAFM-TC)
- Consume shareDeviceStatus after error dialog is dismissed.
- Consume errorLiveData after error dialog is dismissed.
- Device introspection information is now shown in its own screen, instead of in the app's logs.
- The type of a device is now properly set.
- Updated all dependencies to latest versions.
- compileSdk and targetSdk now at 33.
edWin-m and others added 25 commits May 24, 2023 08:26
* pop device fragment on device delete. dismiss DeviceFragment's dialogs on destroy
* remove unused initialSetupEvent* variables
* read basic information cluster's product name and vendor name attributes
* include vendor and product names in devices.proto. display vendor and product names in device fragment
* fix new device alert dialog crash

* dismiss HomeFragment's dialogs on destroy
* accessibility improvements

* accessibility improvements

---------

Co-authored-by: Pierre Delisle <[email protected]>
#153)

Change structure of the project so we can support multiple sample applications in the future.
The only sample app we current have ("app") is renamed "3p-ecosystem" so that each sample app is given a proper descriptive name.
…ependencies. (#160)

"./gradlew build" now works (make sure JAVA_HOME is set properly)
Migrate to version catalogs.
See https://developer.android.com/build/migrate-to-catalogs.
Note that ktfmt formatted many files that were not targetted by this PR.
* chg: aesthetic changes to the Thread Network dialog

Change-Id: Idd97918d42e5b7f17c7027e90256b0bf8531a442

* chg: colors aligned with devsite

Change-Id: I8fade74e94cd982b0f666c5f7b3bc314e8b3fa5d
* Migration to Jetpack Compose.
See https://developer.android.com/codelabs/jetpack-compose-migration#0 for background information.

Step 1: very simple migration as a first step.
bottom-up approach where we simply migrate the Home screen view subtree that is shown when no devices are currently commissioned to the ecosystem.

Also, some gradle upgrades:
- compileSdk: 33 -> 34
- Gradle plugin: 8.1.0 -> 8.1.1
- Kotlin plugin: 1.9.0 -> 1.9.20
- material: 1.9.0 -> 1.10.0
* Convert DeviceFragment to Jetpack Compose.
See https://developer.android.com/codelabs/jetpack-compose-migration#0 for background information.
Still in Step 1: very simple migration as a first step.
bottom-up approach where we simply migrate the Device screen view subtree that is shown when a device is selected.

Also:
- Added support for additional device types
- gradle 8.1 -> 8.2
See https://developer.android.com/codelabs/jetpack-compose-migration#0 for background information.
Still in Step 1: very simple migration as a first step. bottom-up approach where we simply migrate the Inspect screen view subtree that is shown when a device is being inspected.

Minor fix to ClustersMap.
See https://developer.android.com/codelabs/jetpack-compose-migration#0 for background information.
Still in Step 1: very simple migration as a first step. bottom-up approach where we simply migrate the Inspect screen view subtree that is shown when a device is being inspected.

Note that we still have a couple FIXME's.
They could stay around until migration to Compose has been completed if the fixes are not obvious in this hybrid (xml view / compose) world.
Leveraging the library https://github.com/zhanghai/ComposePreference for this migration.

See https://developer.android.com/codelabs/jetpack-compose-migration#0 for background information.
Still in Step 1: very simple migration as a first step. bottom-up approach where we simply migrate the Settings screen view subtree.
See https://developer.android.com/codelabs/jetpack-compose-migration#0 for background information.
Still in Step 1: very simple migration as a first step. bottom-up approach where we simply migrate the Thread screen view subtree that is shown when Thread Network is selected in Developer Utilities.

This is the last migration for Step 1. Next PR should handle scaffolding and navigation to complete the migration to Compose.
These fixes should have been committed to that PR, but unfortunately,
I triggered the PR merge before that commit was pushed :-(.
* Finalizes the migration to Jetpack Compose.

Apologies, this is a huge PR. However, we only need to focus on the Compose artifacts that have been added to finalize that migration. Specifically:

- AppLayout
- AppNavigation
- AppViewModel
- MainActivity

and maybe check a few of the *Screen classes to verify they are properly designed now that all the Fragment artifacts have been removed.
Using Matter Android Demo SDK libraries from Maven repo and migrated to Jetpack Compose.

# Conflicts:
#	3p-ecosystem/src/main/AndroidManifest.xml
#	3p-ecosystem/src/main/java/com/google/homesampleapp/chip/ClustersHelper.kt
#	3p-ecosystem/src/main/java/com/google/homesampleapp/chip/MatterConstants.kt
#	3p-ecosystem/src/main/java/com/google/homesampleapp/commissioning/AppCommissioningService.kt
#	3p-ecosystem/src/main/res/navigation/navigation.xml
#	3p-ecosystem/src/main/res/values/strings.xml
#	3p-ecosystem/src/targetcommissioner/res/values/fragment_inspect.xml
#	3p-ecosystem/src/targetcommissioner/res/values/fragment_new_device.xml
#	3p-ecosystem/src/test/java/com/google/homesampleapp/UtilsTest.kt
#	README.md
#	app/build.gradle
#	app/src/androidTest/java/com/google/homesampleapp/AddDeviceTest.kt
#	app/src/main/java/com/google/homesampleapp/MainActivity.kt
#	app/src/main/java/com/google/homesampleapp/Utils.kt
#	app/src/main/java/com/google/homesampleapp/chip/ChipClient.kt
#	app/src/main/java/com/google/homesampleapp/screens/device/DeviceFragment.kt
#	app/src/main/java/com/google/homesampleapp/screens/device/DeviceViewModel.kt
#	app/src/main/java/com/google/homesampleapp/screens/home/DeviceViewHolder.kt
#	app/src/main/java/com/google/homesampleapp/screens/home/HomeFragment.kt
#	app/src/main/java/com/google/homesampleapp/screens/home/HomeViewModel.kt
#	app/src/test/java/com/google/homesampleapp/UtilsTest.kt
#	app/third_party/connectedhomeip/libs/AndroidPlatform.jar
#	app/third_party/connectedhomeip/libs/CHIPController.jar
#	app/third_party/connectedhomeip/libs/SetupPayloadParser.jar
#	app/third_party/connectedhomeip/libs/jniLibs/arm64-v8a/libCHIPController.so
#	app/third_party/connectedhomeip/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so
#	app/third_party/connectedhomeip/libs/jniLibs/armeabi-v7a/libCHIPController.so
#	app/third_party/connectedhomeip/libs/jniLibs/armeabi-v7a/libSetupPayloadParser.so
#	app/third_party/connectedhomeip/libs/jniLibs/x86/libCHIPController.so
#	app/third_party/connectedhomeip/libs/jniLibs/x86/libSetupPayloadParser.so
#	app/third_party/connectedhomeip/libs/jniLibs/x86_64/libCHIPController.so
#	app/third_party/connectedhomeip/libs/jniLibs/x86_64/libSetupPayloadParser.so
#	build.gradle
#	gradle/wrapper/gradle-wrapper.properties
Copy link

google-cla bot commented Feb 7, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@aBozowski aBozowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pierredelisle pierredelisle merged commit 3d06321 into codelab Feb 7, 2024
0 of 2 checks passed
@pierredelisle pierredelisle deleted the pierred/codelab-sync-v2.0.0 branch February 7, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants