Skip to content

Commit 67cbc0d

Browse files
committed
Merge branch 'main' into feat/user-feedback-button
# Conflicts: # CHANGELOG.md # sentry-android-core/api/sentry-android-core.api # sentry-android-core/src/main/res/layout/sentry_dialog_user_feedback.xml # sentry-android-integration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android/UserFeedbackUiTest.kt # sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.java
2 parents 1bb3095 + 4152701 commit 67cbc0d

File tree

8 files changed

+60
-11
lines changed

8 files changed

+60
-11
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # pin@v2
39+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # pin@v2
4040
with:
4141
languages: 'java'
4242

@@ -45,4 +45,4 @@ jobs:
4545
./gradlew buildForCodeQL --no-build-cache
4646
4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # pin@v2
48+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # pin@v2

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Features
66

77
- Add New User Feedback Widget ([#4450](https://github.com/getsentry/sentry-java/pull/4450))
8-
- This widget is a custom button that can be used to show the user feedback form
8+
- This widget is a custom button that can be used to show the user feedback form
99
- Add New User Feedback form ([#4384](https://github.com/getsentry/sentry-java/pull/4384))
1010
- We now introduce SentryUserFeedbackDialog, which extends AlertDialog, inheriting the show() and cancel() methods, among others.
1111
To use it, just instantiate it and call show() on the instance (Sentry must be previously initialized).
@@ -21,6 +21,8 @@
2121
SentryUserFeedbackDialog.Builder(context).create().show()
2222
```
2323

24+
## 8.13.3
25+
2426
### Fixes
2527

2628
- Send UI Profiling app start chunk when it finishes ([#4423](https://github.com/getsentry/sentry-java/pull/4423))
@@ -29,6 +31,7 @@
2931
- Session Replay: Do not capture current replay for cached events from the past ([#4474](https://github.com/getsentry/sentry-java/pull/4474))
3032
- Session Replay: Correctly capture Dialogs and non full-sized windows ([#4354](https://github.com/getsentry/sentry-java/pull/4354))
3133
- Session Replay: Fix inconsistent `segment_id` ([#4471](https://github.com/getsentry/sentry-java/pull/4471))
34+
- Session Replay: Fix crash on devices with the Unisoc/Spreadtrum T606 chipset ([#4477](https://github.com/getsentry/sentry-java/pull/4477))
3235

3336
## 8.13.2
3437

build-logic/src/main/kotlin/io.sentry.javadoc.aggregate.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ subprojects {
2020

2121
val javadocCollection = javadocPublisher.incoming.artifactView { lenient(true) }.files
2222

23-
tasks.register("aggregateJavadoc", AggregateJavadoc::class) {
23+
tasks.register("aggregateJavadocs", AggregateJavadoc::class) {
2424
group = "documentation"
2525
description = "Aggregates Javadocs from all subprojects into a single directory."
2626
javadocFiles.set(javadocCollection)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ org.gradle.workers.max=2
1414
android.useAndroidX=true
1515

1616
# Release information
17-
versionName=8.13.2
17+
versionName=8.13.3
1818

1919
# Override the SDK name on native crashes on Android
2020
sentryAndroidSdkName=sentry.native.android
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
5+
<solid android:color="@android:color/transparent" />
6+
<stroke
7+
android:width="1dp"
8+
android:color="#FFAAAAAA" /> <!-- border color -->
9+
<corners android:radius="4dp" />
10+
<padding
11+
android:left="8dp"
12+
android:top="8dp"
13+
android:right="8dp"
14+
android:bottom="8dp" />
15+
</shape>

sentry-android-core/src/main/res/layout/sentry_dialog_user_feedback.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
android:layout_height="wrap_content"
4747
android:hint="Your Name"
4848
android:inputType="textPersonName"
49-
android:background="@drawable/edit_text_border"
49+
android:background="@drawable/sentry_edit_text_border"
5050
android:paddingHorizontal="8dp"
5151
android:layout_below="@id/sentry_dialog_user_feedback_txt_name" />
5252

@@ -65,7 +65,7 @@
6565
android:layout_height="wrap_content"
6666
android:hint="your.email@example.org"
6767
android:inputType="textEmailAddress"
68-
android:background="@drawable/edit_text_border"
68+
android:background="@drawable/sentry_edit_text_border"
6969
android:paddingHorizontal="8dp"
7070
android:layout_below="@id/sentry_dialog_user_feedback_txt_email" />
7171

@@ -86,7 +86,7 @@
8686
android:inputType="textMultiLine"
8787
android:gravity="top|left"
8888
android:hint="What's the bug? What did you expect?"
89-
android:background="@drawable/edit_text_border"
89+
android:background="@drawable/sentry_edit_text_border"
9090
android:paddingHorizontal="8dp"
9191
android:layout_below="@id/sentry_dialog_user_feedback_txt_description" />
9292

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package io.sentry.android.replay.util
2+
3+
import android.os.Build
4+
5+
internal object SystemProperties {
6+
enum class Property {
7+
SOC_MODEL,
8+
SOC_MANUFACTURER
9+
}
10+
11+
fun get(key: Property, defaultValue: String = ""): String {
12+
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
13+
when (key) {
14+
Property.SOC_MODEL -> Build.SOC_MODEL
15+
Property.SOC_MANUFACTURER -> Build.SOC_MANUFACTURER
16+
}
17+
} else {
18+
defaultValue
19+
}
20+
}
21+
}

sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import android.os.Build
3939
import android.view.Surface
4040
import io.sentry.SentryLevel.DEBUG
4141
import io.sentry.SentryOptions
42+
import io.sentry.android.replay.util.SystemProperties
4243
import java.io.File
4344
import java.nio.ByteBuffer
4445
import kotlin.LazyThreadSafetyMode.NONE
@@ -155,11 +156,20 @@ internal class SimpleVideoEncoder(
155156
}
156157

157158
fun encode(image: Bitmap) {
158-
// it seems that Xiaomi devices have problems with hardware canvas, so we have to use
159-
// lockCanvas instead https://stackoverflow.com/a/73520742
159+
/** it seems that Xiaomi devices have problems with hardware canvas, so we have to use
160+
* lockCanvas instead https://stackoverflow.com/a/73520742
161+
* ---
162+
* Same for Motorola devices.
163+
* ---
164+
* As for the T606, it's a Spreadtrum/Unisoc chipset and can be spread across various
165+
* devices, so we have to check the SOC_MODEL property, as the manufacturer name might have
166+
* changed.
167+
* https://github.com/getsentry/sentry-android-gradle-plugin/issues/861#issuecomment-2867021256
168+
*/
160169
val canvas = if (
161170
Build.MANUFACTURER.contains("xiaomi", ignoreCase = true) ||
162-
Build.MANUFACTURER.contains("motorola", ignoreCase = true)
171+
Build.MANUFACTURER.contains("motorola", ignoreCase = true) ||
172+
SystemProperties.get(SystemProperties.Property.SOC_MODEL).equals("T606", ignoreCase = true)
163173
) {
164174
surface?.lockCanvas(null)
165175
} else {

0 commit comments

Comments
 (0)