Skip to content

fix(feedback): Do not redefine system resources #4519

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

Merged
merged 3 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Log parameter objects are now turned into `String` via `toString` ([#4515](https://github.com/getsentry/sentry-java/pull/4515))
- One of the two `SentryLogEventAttributeValue` constructors did not convert the value previously.
- Logs are now flushed on shutdown ([#4503](https://github.com/getsentry/sentry-java/pull/4503))
- User Feedback: Do not redefine system attributes for `SentryUserFeedbackButton`, but reference them instead ([#4519](https://github.com/getsentry/sentry-java/pull/4519))

### Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.sentry.IScopes;
import io.sentry.Sentry;
import io.sentry.SentryFeedbackOptions;
import io.sentry.SentryIntegrationPackageStorage;
import io.sentry.SentryLevel;
import io.sentry.SentryOptions;
import io.sentry.protocol.Feedback;
Expand All @@ -34,6 +35,7 @@ public final class SentryUserFeedbackDialog extends AlertDialog {
final @Nullable OptionsConfiguration configuration) {
super(context, themeResId);
this.configuration = configuration;
SentryIntegrationPackageStorage.getInstance().addIntegration("UserFeedbackWidget");
}

@Override
Expand Down
15 changes: 8 additions & 7 deletions sentry-android-core/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- We have to omit 'format' here as we're referencing the system attributes from the '@android:' namespace -->
<declare-styleable name="SentryUserFeedbackButton" >
<attr name="android:drawableStart" format="reference" />
<attr name="android:drawablePadding" format="dimension" />
<attr name="android:padding" format="dimension" />
<attr name="android:textAllCaps" format="boolean" />
<attr name="android:background" format="reference|color" />
<attr name="android:textColor" format="reference|color" />
<attr name="android:text" format="string" />
<attr name="android:drawableStart" />
<attr name="android:drawablePadding" />
<attr name="android:padding" />
<attr name="android:textAllCaps" />
<attr name="android:background" />
<attr name="android:textColor" />
<attr name="android:text" />
</declare-styleable>
</resources>
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Just a dummy styleable to verify resource merging -->
<declare-styleable name="DummyStyle" >
<attr name="android:drawableStart" format="reference" />
<attr name="android:drawablePadding" format="dimension" />
<attr name="android:padding" format="dimension" />
<attr name="android:textAllCaps" format="boolean" />
<attr name="android:background" format="reference|color" />
<attr name="android:textColor" format="reference|color" />
<attr name="android:text" format="string" />
</declare-styleable>

<bool tools:ignore="UnusedResources" name="leak_canary_allow_in_non_debuggable_build">true</bool>
</resources>
Loading