-
Notifications
You must be signed in to change notification settings - Fork 3
feat: XML Views Automasking options #299
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
* andrey/compilation-fix: missed imports chore: release main (#297)
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.
Bug: ldMask modifier ignored when matchers list empty
The condition checks maskMatchers.isNotEmpty() instead of sensitiveComposeRects.isNotEmpty() before applying masking. This causes views marked with the ldMask() modifier to not be masked when the matchers list is empty, even though the sensitive areas were collected. The ldMask() modifier should work independently of configured matchers.
sdk/@launchdarkly/observability-android/lib/src/main/kotlin/com/launchdarkly/observability/replay/CaptureSource.kt#L156-L161
Lines 156 to 161 in 8ede685
| maskSensitiveRects(bitmap, sensitiveComposeRects) | |
| } else { | |
| bitmap | |
| } | |
| // TODO: O11Y-625 - optimize memory allocations here, re-use byte arrays and such |
...ndroid/lib/src/main/kotlin/com/launchdarkly/observability/replay/masking/NativeMaskTarget.kt
Outdated
Show resolved
Hide resolved
...lib/src/main/kotlin/com/launchdarkly/observability/replay/masking/SensitiveAreasCollector.kt
Show resolved
Hide resolved
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-observability-android: 0.16.0</summary> ## [0.16.0](launchdarkly-observability-android-0.15.0...launchdarkly-observability-android-0.16.0) (2025-11-22) ### Features * XML Views Automasking options ([#299](#299)) ([c61a7be](c61a7be)) ### Bug Fixes * missed imports ([#298](#298)) ([6e6c388](6e6c388)) </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.16.0 with XML Views automasking and an import fix; update manifest and gradle version. > > - **SDK `observability-android`**: > - Bump version to `0.16.0` in `sdk/@launchdarkly/observability-android/gradle.properties` and `.release-please-manifest.json`. > - Update `CHANGELOG.md`: > - Features: XML Views automasking options. > - Bug Fixes: missed imports. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d827ba6. 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
Support maskText, maskTextInput, maskSensitive for Android Native XML Views
How did you test this change?
Are there any deployment considerations?
Note
Adds auto-masking for Android XML views and refactors masking to a new MaskTarget/MaskMatcher API, updating capture/instrumentation and e2e demo package paths.
replay/masking: introduceMaskTarget/MaskMatcher,ComposeMaskTarget,NativeMaskTarget(handlesEditText/TextView, passwords, hints, contentDescription), andSensitiveAreasCollector(now usesLDLogger).PrivacyProfilematchers rewritten to operate onMaskTarget(textInput,text,sensitive).CaptureSourcenow acceptsLDLoggerand uses newmasking.SensitiveAreasCollector;ReplayInstrumentationcreates logger and passes it toCaptureSource.replay/MaskMatcher.ktand oldSensitiveAreasCollector.com.example.androidobservability.smoothie; updateAndroidManifest.xml,MainActivity, and adapter imports.SmoothieAdapter: callldMask()on image view to mark as sensitive.Written by Cursor Bugbot for commit 60a4713. This will update automatically on new commits. Configure here.