Commit 6233764
authored
feat: Support ldMask() for Native and Compose views. (#295)
## Summary
1. Support ldMask() for Native and Compose views.
a. Native
```
view.ldMask()
```
b. Compose
```
modifier = Modifier.ldMask()
```
2. 2 XML screens: Fruta and Credit Card
3. Make Compose User form rotate
## How did you test this change?
Test SR using RRWeb player on SecondaryActivity, Fruta(XML), Credit Card
<img width="660" height="1294" alt="image"
src="https://github.com/user-attachments/assets/f6cba822-fd59-43f1-9aac-040200e6dffb"
/>
<img width="324" height="655" alt="image"
src="https://github.com/user-attachments/assets/7f3d98f6-601d-4e6e-8f74-b0306c026717"
/>
<!-- CURSOR_SUMMARY -->
---
> [!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.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f04c7eb. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 5f580da commit 6233764
File tree
31 files changed
+648
-139
lines changed- e2e/android/app
- src/main
- assets/smoothie/images
- java/com
- example/androidobservability
- smoothie
- res
- layout
- values
- sdk/@launchdarkly/observability-android
- lib/src/main
- kotlin/com/launchdarkly/observability
- api
- replay
- res/values
31 files changed
+648
-139
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| |||
0 commit comments