Skip to content

fix: reject invalid orientation values - #4151

Draft
mrousavy wants to merge 2 commits into
mainfrom
agent/validate-camera-orientation-conversions
Draft

fix: reject invalid orientation values#4151
mrousavy wants to merge 2 commits into
mainfrom
agent/validate-camera-orientation-conversions

Conversation

@mrousavy

Copy link
Copy Markdown
Owner

Summary

  • make CameraOrientation(interfaceOrientation:) failable and return nil for UIInterfaceOrientation.unknown
  • make Android CameraOrientation.fromDegrees(...) return null outside the documented 0..359 range
  • use explicit, non-overlapping degree buckets so invalid values cannot silently become UP
  • handle nullable conversions explicitly at all iOS and Android call sites

Stacking

This PR is based on #4150 and should merge after it.

Validation

  • ktlint on the changed Kotlin files
  • swift format lint on the changed Swift files
  • git diff --check
  • native iOS and Android builds intentionally left to CI

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-vision-camera-docs Ready Ready Preview Aug 12, 2026 6:39pm

Request Review

Base automatically changed from agent/fix-orientation-listener-initial-values to main August 12, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant