Skip to content

Improve Camera2 media selection and preview handling#25

Open
rifuki wants to merge 7 commits into
Atomos-X:masterfrom
rifuki:fix/instagram-camera2-fixes
Open

Improve Camera2 media selection and preview handling#25
rifuki wants to merge 7 commits into
Atomos-X:masterfrom
rifuki:fix/instagram-camera2-fixes

Conversation

@rifuki

@rifuki rifuki commented May 22, 2026

Copy link
Copy Markdown

Summary

  • Resolve selected image/video IDs from DocumentsProvider URIs so media chosen through Android's picker is saved correctly.
  • Apply EXIF orientation before passing image sources to native processing.
  • Stabilize Camera2 preview replacement by selecting the preview-sized surface, matching blackhole dimensions, and avoiding renderer startup on invalid/abandoned surfaces.
  • Compute Camera2 display orientation from sensor/camera facing instead of using raw display rotation.

Issues

Testing

  • Built successfully with ./gradlew :app:assembleModernDebug.
  • Installed and tested on Sony Xperia XZ3, Android 12, Magisk + LSPosed, Instagram com.instagram.android.
  • Verified picker URI media ID resolution with commit 7298162.
  • Verified Instagram Instant camera works after the Camera2 surface/session changes.

@rifuki

rifuki commented May 22, 2026

Copy link
Copy Markdown
Author
screen-20260522-213238.1.mp4

@rifuki rifuki force-pushed the fix/instagram-camera2-fixes branch from bc41bad to a470401 Compare May 23, 2026 16:10
@rifuki rifuki marked this pull request as ready for review May 23, 2026 16:13
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.

Image selected from Android picker is not saved

2 participants