-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Support ldMask() for Native and Compose views. #295
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
Conversation
e2e/android/app/src/main/res/layout/activity_credit_card.xml
Dismissed
Show dismissed
Hide dismissed
e2e/android/app/src/main/res/layout/activity_smoothie_list.xml
Dismissed
Show dismissed
Hide dismissed
...android/lib/src/main/kotlin/com/launchdarkly/observability/replay/SensitiveAreasCollector.kt
Show resolved
Hide resolved
...android/lib/src/main/kotlin/com/launchdarkly/observability/replay/SensitiveAreasCollector.kt
Outdated
Show resolved
Hide resolved
|
I did a high level review and don't have any concerns. Due to my bandwidth constraints, I think @agrognetti will have to be primary reviewer. |
...android/lib/src/main/kotlin/com/launchdarkly/observability/replay/SensitiveAreasCollector.kt
Show resolved
Hide resolved
Vadman97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable to me!
...android/lib/src/main/kotlin/com/launchdarkly/observability/replay/SensitiveAreasCollector.kt
Show resolved
Hide resolved
| @@ -0,0 +1,49 @@ | |||
| package com.smoothie | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package should be inside com.example.androidobservability (The whole code of the app goes there - unless you use different modules, which is not the case)
| @@ -0,0 +1,48 @@ | |||
| package com.smoothie | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shouldn't be committed
| <item name = "ld_mask_tag" type="id"/> | ||
| <item name = "ld_unmask_tag" type="id"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the correct formatting when writing resources
| <item name = "ld_mask_tag" type="id"/> | |
| <item name = "ld_unmask_tag" type="id"/> | |
| <item name="ld_mask_tag" type="id" /> | |
| <item name="ld_unmask_tag" type="id" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I add local.properties into .gitignore? @agrognetti
| */ | ||
| private fun findNativeSensitiveRects( | ||
| view: View, | ||
| matchers: List<MaskMatcher> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter is not used inside the function
| null | ||
| } | ||
| } catch (ignored: Exception) { | ||
| null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't be better to at least log the exceptions? Here and in the other "catch" blocks
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-observability-android: 0.15.0</summary> ## [0.15.0](launchdarkly-observability-android-0.14.1...launchdarkly-observability-android-0.15.0) (2025-11-21) ### Features * Support ldMask() for Native and Compose views. ([#295](#295)) ([6233764](6233764)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Release observability-android 0.15.0 adding ldMask() support for Native and Compose views. > > - **Android SDK (`sdk/@launchdarkly/observability-android`)**: > - Version bump to `0.15.0` (`.release-please-manifest.json`, `gradle.properties`). > - Feature: add `ldMask()` support for Native and Compose views. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 430fcdb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
* main: (85 commits) doc: Add using ldMask in readme. (#311) chore: release main (#312) feat: take transformed coordinates, which are more precise in animation (#309) chore: release main (#307) fix(SEC-7530): update react-server-dom-webpack to 19.0.1 (#310) feat: recursive mask collection (#308) feat: support non-standard windows added by WindowManager (#306) feat: Android SR Do not send duplicate screens (#304) test: Add UI and logic to evaluate boolean flags (#305) chore: release main (#303) feat: Android Dialog Capture (#302) chore: Update Android Test main screen (#301) chore: release main (#300) feat: XML Views Automasking options (#299) fix: missed imports (#298) chore: release main (#297) feat: Support ldMask() for Native and Compose views. (#295) chore: release main (#296) fix: tweaks Android InteractionDetector to delegate additional defaul… (#294) chore: release main (#293) ... # Conflicts: # e2e/react-router/src/ldclientLazy.tsx # e2e/react-router/src/routes/root.tsx
Summary
a. Native
b. Compose
How did you test this change?
Test SR using RRWeb player on SecondaryActivity, Fruta(XML), Credit Card
Note
Adds ldMask for native Views and Compose, introduces SensitiveAreasCollector to mask captured regions, and includes new Credit Card and Smoothie sample screens.
View.ldMask()/ldUnmask()andModifier.ldMask()/ldUnmask()inMaskingViewAPI.kt; defineLdMaskSemanticsKey.SensitiveAreasCollectorto gather sensitive rects from Compose semantics and nativeViewtags; addview_tags.xmlids.CaptureSourceto useSensitiveAreasCollectorand apply gray masking over returned rects.CreditCardActivityandSmoothieListActivitywith layouts (activity_credit_card.xml,activity_smoothie_list.xml,item_smoothie.xml) andSmoothieAdapter; register inAndroidManifest.xmland add launch buttons inMainActivity.SecondaryActivityto useModifier.ldMask()on header and animate rotation of the address card.Theme.Material3.DayNight.NoActionBar; addandroidx.recyclerview:recyclerviewdependency.Written by Cursor Bugbot for commit f04c7eb. This will update automatically on new commits. Configure here.