bug(android): safe area inset arithmetic has no bounds check — UI can shift off-screen #66
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
solitaire_engine/src/safe_area.rsapplies safe area insets to layout without clamping. On devices with unusually large insets (foldables, very tall notches) or if the JNI polling returns a bogus value, the inset math could push UI elements off the visible screen area entirely.Affected file
solitaire_engine/src/safe_area.rsFix
Clamp each inset value to a sane maximum before applying it (e.g. 20% of the window dimension):
Also add a
warn!()if an inset exceeds the threshold so it is visible during device testing.