eden/src/android
coolone 860acb4faf
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
[android] Fix crash on start any games for many handhelds (Ayaneo, Retroid etc) (#3647)
## Summary
This change hardens Android Picture-in-Picture handling to avoid runtime crashes on devices/ROMs where PiP APIs are unavailable or behave inconsistently.

## What changed
- Added a feature gate for PiP support using `FEATURE_PICTURE_IN_PICTURE`.
- Early-returned from PiP flows when unsupported.
- Wrapped PiP API calls (`enterPictureInPictureMode`, `setPictureInPictureParams`) in guarded handlers that catch `IllegalStateException` and `UnsupportedOperationException`.
- Logged one warning per failed PiP action to avoid log spam.

## Why
On some Android devices, calling PiP APIs can throw at runtime even when the app is otherwise functioning normally. This patch prevents those calls from crashing/interrupting emulation and keeps behavior unchanged on supported devices.

## Notes
- No behavior changes for fully PiP-capable devices.
- Safe no-op on unsupported devices.

Co-authored-by: Nikolai Trukhin <coolone.official@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3647
Reviewed-by: DraVee <chimera@dravee.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-04-22 05:32:52 +02:00
..
app [android] Fix crash on start any games for many handhelds (Ayaneo, Retroid etc) (#3647) 2026-04-22 05:32:52 +02:00
gradle/wrapper android: Update various deps 2025-04-01 18:30:57 +02:00
.gitignore android: Ignore validation layers library in git 2023-09-19 00:31:43 -04:00
build.gradle.kts Revert "[gradle] fix warnings & update deps (#189)" 2025-06-15 21:46:24 -04:00
gradle.properties [chore] Fixed a couple memory leaks using up ~15 MB each iteration (#398) 2025-12-26 02:55:52 +01:00
gradlew android: Various fixes for CI. 2023-06-03 00:06:05 -07:00
gradlew.bat android: Various fixes for CI. 2023-06-03 00:06:05 -07:00
settings.gradle.kts [android] Properly set Root of the Project (#3177) 2025-12-23 22:23:56 +01:00