@@ -39,6 +39,7 @@ import android.os.Build
3939import android.view.Surface
4040import io.sentry.SentryLevel.DEBUG
4141import io.sentry.SentryOptions
42+ import io.sentry.android.replay.util.SystemProperties
4243import java.io.File
4344import java.nio.ByteBuffer
4445import 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