Skip to content

Commit

Permalink
fix: disable native orientation change on Android (#2540)
Browse files Browse the repository at this point in the history
* fix: disable native orientation change on Android

* chore: changelog
  • Loading branch information
vaind authored Jan 2, 2025
1 parent e442847 commit 5e45246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Enhancements

- Replay: improve performance of screenshot data to native recorder ([#2530](https://github.com/getsentry/sentry-dart/pull/2530))
- Replay: improve orientation change tracking accuracy on Android ([#2540](https://github.com/getsentry/sentry-dart/pull/2540))

### Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ class SentryFlutter(
) {
options.sessionSampleRate = data["sessionSampleRate"] as? Double
options.onErrorSampleRate = data["onErrorSampleRate"] as? Double

// Disable native tracking of orientation change (causes replay restart)
// because we don't have the new size from Flutter yet. Instead, we'll
// trigger onConfigurationChanged() manually in setReplayConfig().
options.setTrackOrientationChange(false)
}
}

Expand Down

0 comments on commit 5e45246

Please sign in to comment.