Files
foto-duplicate-finder-free/app
SoftwareApp bb250d1675 fix: set up edge-to-edge without Android 15's deprecated window APIs
Play's release dashboard listed Window.setStatusBarColor, Window.setNavigationBarColor and
LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES under "deprecated APIs or parameters for
edge-to-edge", starting in vr.b, xr.b and zr.b. None of those are app code: the R8 mapping
resolves vr/xr/zr to androidx.activity's EdgeToEdgeApi26/29/35, and a dexdump of the release
DEX finds six calls to the two colour setters, all reached through
ComponentActivity.enableEdgeToEdge(). Its per-API implementations still paint the bar scrims
(API 21/26/29) and select SHORT_EDGES on API 28/29, which Android 15 deprecates for apps
targeting SDK 35+.

MainActivity now calls ui/theme/EdgeToEdge.applyEdgeToEdge() instead. It keeps the parts that
still matter - setDecorFitsSystemWindows(false), navigation-bar contrast off, cutout mode
"always" on API 30+, and light/dark bar icons read from the system night mode - and drops the
scrim writes. The transparent bars continue to come from the XML theme, which does not
compile into a DEX call, so pre-35 devices look unchanged; API 28/29 keep the platform
default cutout mode rather than the deprecated SHORT_EDGES. The insets handling in
ScannerScreen (TopAppBar and navigationBarsPadding) is untouched.

Verified on the connected Android 12 device in both light and dark mode: the window reports
layoutInDisplayCutoutMode=always and the expected LIGHT_STATUS_BAR/LIGHT_NAVIGATION_BAR
flags, and the screenshots show content behind both bars with readable icons. The rebuilt
release APK and AAB contain zero references to setStatusBarColor/setNavigationBarColor and
no androidx.activity.EdgeToEdge classes; testDebugUnitTest and lintDebug pass (only the
pre-existing OldTargetApi warning). CHANGELOG records the change.
2026-10-18 16:48:02 +02:00
..