Skip to content

Commit 80788c4

Browse files
committed
Fix formatting
1 parent 5acb078 commit 80788c4

File tree

1 file changed

+25
-20
lines changed
  • docs/platforms/android/session-replay/privacy

1 file changed

+25
-20
lines changed

docs/platforms/android/session-replay/privacy/index.mdx

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ options.experimental.sessionReplay.maskAllText = false
2222
options.experimental.sessionReplay.maskAllImages = false
2323
```
2424

25-
![Session Replay unredacted](./img/session-replay.jpg) ![Session Replay redacted](./img/session-replay-redacted.jpg)
25+
Session Replay Unmasked | Session Replay Masked
26+
:-----------------------------:|:-----------------------------:
27+
![](./img/session-replay.jpg) | ![](./img/session-replay-redacted.jpg)
28+
2629

2730
_Make sure your Sentry Android SDK version is at least 7.15.0._
2831

@@ -37,8 +40,8 @@ Let's say you have:
3740
You can set the options like this:
3841

3942
```kotlin
40-
options.experimental.sessionReplay.addMaskViewClass("com.example.MyCustomView")
41-
options.experimental.sessionReplay.addUnmaskViewClass("com.example.MyCustomTextView")
43+
options.experimental.sessionReplay.addMaskViewClass("com.example.MyCustomView")
44+
options.experimental.sessionReplay.addUnmaskViewClass("com.example.MyCustomTextView")
4245
```
4346

4447
<Note>
@@ -52,35 +55,37 @@ If you're using a code obfuscation tool (R8/ProGuard), adjust your proguard rule
5255
The masking behavior applies to classes and their subclasses. This means if you add a view via `addMaskViewClass` (for example, `TextView`, which is the default behavior), its respective subclasses (`RadioButton`, `CheckBox`, `EditText`, and so on) will also be masked. For example, you can do the following:
5356

5457
```kotlin
55-
options.experimental.sessionReplay.addMaskViewClass("android.widget.TextView") // mask TextView and all its subclasses
56-
options.experimental.sessionReplay.addUnmaskViewClass("android.widget.RadioButton") // but unmask RadioButton and all its subclasses
58+
options.experimental.sessionReplay.addMaskViewClass("android.widget.TextView") // mask TextView and all its subclasses
59+
options.experimental.sessionReplay.addUnmaskViewClass("android.widget.RadioButton") // but unmask RadioButton and all its subclasses
5760
```
5861

5962
## Mask by View Instance
6063

6164
You can also choose to mask or unmask a specific view instance by using tags like this:
6265

6366
```xml
64-
<View
65-
android:id="@+id/my_view"
66-
android:layout_width="wrap_content"
67-
android:layout_height="wrap_content"
68-
android:tag="sentry-mask|sentry-unmask"/>
67+
<View
68+
android:id="@+id/my_view"
69+
android:layout_width="wrap_content"
70+
android:layout_height="wrap_content"
71+
android:tag="sentry-mask|sentry-unmask"
72+
/>
6973
```
7074

7175
```kotlin
72-
view.tag = "sentry-mask|sentry-unmask"
76+
view.tag = "sentry-mask|sentry-unmask"
7377
```
7478

7579
If your view already has a tag assigned, you can set the masking tag by a sentry-specific id:
7680

7781
```xml
78-
<View
79-
android:id="@+id/my_view"
80-
android:layout_width="wrap_content"
81-
android:layout_height="wrap_content">
82-
<tag android:id="@id/sentry_privacy" android:value="mask|unmask"/>
83-
</View>
82+
<View
83+
android:id="@+id/my_view"
84+
android:layout_width="wrap_content"
85+
android:layout_height="wrap_content">
86+
87+
<tag android:id="@id/sentry_privacy" android:value="mask|unmask"/>
88+
</View>
8489
```
8590

8691
```kotlin
@@ -90,9 +95,9 @@ If your view already has a tag assigned, you can set the masking tag by a sentry
9095
We also provide convenient extension functions for Kotlin:
9196

9297
```kotlin
93-
view.sentryReplayMask()
94-
// or
95-
view.sentryReplayUnmask()
98+
view.sentryReplayMask()
99+
// or
100+
view.sentryReplayUnmask()
96101
```
97102

98103
## Jetpack Compose

0 commit comments

Comments
 (0)