Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0131)
- [diff](https://github.com/getsentry/sentry-native/compare/0.12.7...0.13.1)

### Internal

- Check notification permission before launching request to fix flaky API 34 tests ([#5146](https://github.com/getsentry/sentry-java/pull/5146))

## 8.33.0

### Features
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.sentry.uitest.android.critical

import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.widget.Toast
Expand All @@ -22,6 +23,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat
import io.sentry.Sentry
import io.sentry.android.core.performance.AppStartMetrics
import io.sentry.uitest.android.critical.NotificationHelper.showNotification
Expand Down Expand Up @@ -82,7 +84,13 @@ class MainActivity : ComponentActivity() {
Button(onClick = { finish() }) { Text("Finish Activity") }
Button(
onClick = {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (
Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
ContextCompat.checkSelfPermission(
this@MainActivity,
android.Manifest.permission.POST_NOTIFICATIONS,
) != PackageManager.PERMISSION_GRANTED
) {
requestPermissionLauncher.launch(android.Manifest.permission.POST_NOTIFICATIONS)
} else {
postNotification()
Expand Down
Loading