Skip to content

Conversation

@abelonogov-ld
Copy link
Contributor

@abelonogov-ld abelonogov-ld commented Nov 19, 2025

Summary

  1. Support ldMask() for Native and Compose views.
    a. Native
  view.ldMask()

b. Compose

 modifier = Modifier.ldMask()
  1. 2 XML screens: Fruta and Credit Card
  2. Make Compose User form rotate

How did you test this change?

Test SR using RRWeb player on SecondaryActivity, Fruta(XML), Credit Card

image image

Note

Adds ldMask for native Views and Compose, introduces SensitiveAreasCollector to mask captured regions, and includes new Credit Card and Smoothie sample screens.

  • SDK / Session Replay:
    • Masking API: Add View.ldMask()/ldUnmask() and Modifier.ldMask()/ldUnmask() in MaskingViewAPI.kt; define LdMaskSemanticsKey.
    • Sensitive Area Detection: Introduce SensitiveAreasCollector to gather sensitive rects from Compose semantics and native View tags; add view_tags.xml ids.
    • Capture Pipeline: Refactor CaptureSource to use SensitiveAreasCollector and apply gray masking over returned rects.
  • E2E App:
    • New Screens (XML): Add CreditCardActivity and SmoothieListActivity with layouts (activity_credit_card.xml, activity_smoothie_list.xml, item_smoothie.xml) and SmoothieAdapter; register in AndroidManifest.xml and add launch buttons in MainActivity.
    • Compose Demo: Update SecondaryActivity to use Modifier.ldMask() on header and animate rotation of the address card.
    • UI/Dependencies: Switch theme to Theme.Material3.DayNight.NoActionBar; add androidx.recyclerview:recyclerview dependency.

Written by Cursor Bugbot for commit f04c7eb. This will update automatically on new commits. Configure here.

@abelonogov-ld abelonogov-ld requested a review from a team as a code owner November 19, 2025 20:04
@tanderson-ld
Copy link
Contributor

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.

Copy link
Contributor

@Vadman97 Vadman97 left a 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!

@abelonogov-ld abelonogov-ld enabled auto-merge (squash) November 21, 2025 18:10
@abelonogov-ld abelonogov-ld merged commit 6233764 into main Nov 21, 2025
22 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/xml-views-ldmask branch November 21, 2025 18:11
@@ -0,0 +1,49 @@
package com.smoothie
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

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

Comment on lines +3 to +4
<item name = "ld_mask_tag" type="id"/>
<item name = "ld_unmask_tag" type="id"/>
Copy link
Contributor

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

Suggested change
<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" />

Copy link
Contributor Author

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>
Copy link
Contributor

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
Copy link
Contributor

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

abelonogov-ld added a commit that referenced this pull request Nov 21, 2025
* main:
  feat: Support ldMask() for Native and Compose views. (#295)
  chore: release main (#296)
  fix: tweaks Android InteractionDetector to delegate additional defaul… (#294)
Vadman97 pushed a commit that referenced this pull request Nov 21, 2025
🤖 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 -->
abelonogov-ld added a commit that referenced this pull request Dec 4, 2025
* 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
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.

5 participants