Skip to content

Commit 8fde83a

Browse files
authored
fix(feedback): Do not redefine system resources (#4519)
* fix(feedback-widget): Do not redefine system resources * Add to feedback widget to integrations * Changelog
1 parent 1528dfb commit 8fde83a

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Log parameter objects are now turned into `String` via `toString` ([#4515](https://github.com/getsentry/sentry-java/pull/4515))
1414
- One of the two `SentryLogEventAttributeValue` constructors did not convert the value previously.
1515
- Logs are now flushed on shutdown ([#4503](https://github.com/getsentry/sentry-java/pull/4503))
16+
- User Feedback: Do not redefine system attributes for `SentryUserFeedbackButton`, but reference them instead ([#4519](https://github.com/getsentry/sentry-java/pull/4519))
1617

1718
### Features
1819

sentry-android-core/src/main/java/io/sentry/android/core/SentryUserFeedbackDialog.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.sentry.IScopes;
1313
import io.sentry.Sentry;
1414
import io.sentry.SentryFeedbackOptions;
15+
import io.sentry.SentryIntegrationPackageStorage;
1516
import io.sentry.SentryLevel;
1617
import io.sentry.SentryOptions;
1718
import io.sentry.protocol.Feedback;
@@ -34,6 +35,7 @@ public final class SentryUserFeedbackDialog extends AlertDialog {
3435
final @Nullable OptionsConfiguration configuration) {
3536
super(context, themeResId);
3637
this.configuration = configuration;
38+
SentryIntegrationPackageStorage.getInstance().addIntegration("UserFeedbackWidget");
3739
}
3840

3941
@Override
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3+
<!-- We have to omit 'format' here as we're referencing the system attributes from the '@android:' namespace -->
34
<declare-styleable name="SentryUserFeedbackButton" >
4-
<attr name="android:drawableStart" format="reference" />
5-
<attr name="android:drawablePadding" format="dimension" />
6-
<attr name="android:padding" format="dimension" />
7-
<attr name="android:textAllCaps" format="boolean" />
8-
<attr name="android:background" format="reference|color" />
9-
<attr name="android:textColor" format="reference|color" />
10-
<attr name="android:text" format="string" />
5+
<attr name="android:drawableStart" />
6+
<attr name="android:drawablePadding" />
7+
<attr name="android:padding" />
8+
<attr name="android:textAllCaps" />
9+
<attr name="android:background" />
10+
<attr name="android:textColor" />
11+
<attr name="android:text" />
1112
</declare-styleable>
1213
</resources>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources xmlns:tools="http://schemas.android.com/tools">
3+
<!-- Just a dummy styleable to verify resource merging -->
4+
<declare-styleable name="DummyStyle" >
5+
<attr name="android:drawableStart" format="reference" />
6+
<attr name="android:drawablePadding" format="dimension" />
7+
<attr name="android:padding" format="dimension" />
8+
<attr name="android:textAllCaps" format="boolean" />
9+
<attr name="android:background" format="reference|color" />
10+
<attr name="android:textColor" format="reference|color" />
11+
<attr name="android:text" format="string" />
12+
</declare-styleable>
13+
314
<bool tools:ignore="UnusedResources" name="leak_canary_allow_in_non_debuggable_build">true</bool>
415
</resources>

0 commit comments

Comments
 (0)