-
-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
958 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
-keepattributes SourceFile,LineNumberTable | ||
|
||
# Rules to detect Images/Icons and redact them | ||
-dontwarn androidx.compose.ui.graphics.painter.Painter | ||
-keepnames class * extends androidx.compose.ui.graphics.painter.Painter | ||
-keepclasseswithmembernames class * { | ||
androidx.compose.ui.graphics.painter.Painter painter; | ||
} | ||
# Rules to detect Text colors and if they have Modifier.fillMaxWidth to later redact them | ||
-dontwarn androidx.compose.ui.graphics.ColorProducer | ||
-dontwarn androidx.compose.foundation.layout.FillElement | ||
-keepnames class androidx.compose.foundation.layout.FillElement | ||
-keepclasseswithmembernames class * { | ||
androidx.compose.ui.graphics.ColorProducer color; | ||
} | ||
# Rules to detect a compose view to parse its hierarchy | ||
-dontwarn androidx.compose.ui.platform.AndroidComposeView | ||
-keepnames class androidx.compose.ui.platform.AndroidComposeView |
29 changes: 29 additions & 0 deletions
29
sentry-android-replay/src/main/java/io/sentry/android/replay/ModifierExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.sentry.android.replay | ||
|
||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.semantics.SemanticsPropertyKey | ||
import androidx.compose.ui.semantics.semantics | ||
import io.sentry.android.replay.SentryReplayModifiers.SentryPrivacy | ||
|
||
public object SentryReplayModifiers { | ||
val SentryPrivacy = SemanticsPropertyKey<String>( | ||
name = "SentryPrivacy", | ||
mergePolicy = { parentValue, _ -> parentValue } | ||
) | ||
} | ||
|
||
public fun Modifier.sentryReplayRedact(): Modifier { | ||
return semantics( | ||
properties = { | ||
this[SentryPrivacy] = "redact" | ||
} | ||
) | ||
} | ||
|
||
public fun Modifier.sentryReplayIgnore(): Modifier { | ||
return semantics( | ||
properties = { | ||
this[SentryPrivacy] = "ignore" | ||
} | ||
) | ||
} |
Oops, something went wrong.