Android 17 Playground audit¶
- Kind: concept
- Date: 2026-10-14
- Source: moved from
how-it-works/plat/android/android17-playground-audit.md; #12275, #12270, #12276, #12273, #12369 - Shaped: Android 17 (targetSdk 37) audit: Playground app
Scope¶
12275 (part of #12270, consumed by #12276) audited android/playground/* against the Android 17¶
behaviour changes that apply at targetSdk 37. #12276 made the bump.
Results¶
| Change | Verdict | Evidence |
|---|---|---|
| Background audio restrictions | Foreground-only decision implemented by #12276 | No scenario requires background playback. VideoPlayerScreen.kt and AudioPlayerComponent.kt observe ON_STOP via LocalLifecycleOwner and call MediaPlayerViewModel.onHostStopped(), removing observers on disposal. The ViewModel delegates to the pure HostPlayback seam, which pauses media with play intent, including while buffering; paused/idle hosts stay unchanged. No automatic resume, services or permissions were added. This gives the same explicit stop policy at targetSdk 36 and 37. FullscreenMediaPlayer only simulates progress; it has no media player. |
| Large-screen orientation / resizability | Not affected | No screenOrientation, setRequestedOrientation, resizeableActivity, maxAspectRatio or minAspectRatio in any playground manifest or source (app/src/main/AndroidManifest.xml:17-21,41-44). Layouts already adapt to orientation (login/.../LoginScreen.kt:94-104, slides/.../LargeTextSlideItem.kt:39-41, mediaplayer/.../VideoPlayerScreen.kt:90). Fixed sizes are small and incidental (e.g. MediaPlayerScreen.kt:250, OnboardingScreen.kt:144). |
Reflection on static final fields |
Not affected, but fixed | LoginScreen.kt set the instance property isAuthenticated reflectively. UserPreferences.isAuthenticated (storage/.../UserPreferences.kt:19-23) is a custom-accessor property with no backing field, so the lookup could not succeed. Replaced with a direct userPreferences.isAuthenticated = true, and the parameter is now typed UserPreferences. Other reflection: only a java.lang.reflect.Proxy in a test (discover/src/test/.../LoggingInputConnectionTest.kt). |
Background activity launch via IntentSender, System.load, Contacts / SMS, content capture |
Not affected | No IntentSender, System.load/loadLibrary, ContactsContract, Telephony/SMS, ContentCapture or PendingIntent in playground. startActivity is in UI code (discover/.../ictrace/IcTraceScreen.kt:99) and in app/.../navigation/DeepLinkManager.kt:614, which only the unreferenced navigateTo*ForTest helpers (:461-518) call; the only receivers are debug-only (app/src/debug/AndroidManifest.xml:4-19) and start no activity. |
| Certificate Transparency / ECH | Not affected | No TrustManager, SSLContext, networkSecurityConfig, cleartext flag or mock TLS server in playground. OkHttp (app/.../App.kt:12-25, demos/.../NetworkTestScreen.kt:66-76) talks to public HTTPS hosts with platform trust; mocking is in-process via the SDK interceptor. |
Owed to the API 37 lane (#12273)¶
- Emulator suites on a tablet or foldable profile (smallest width 600dp or more), since orientation and aspect locks are ignored there.
- Re-run the login flow on a device: the direct-API change above makes the success path navigate to Home, which the reflective code could not do.
- Playground suites on API 37 and the existing API levels.
The bump-time re-grep (2026-10-15) found no matches for the terms in the CtrlProxy audit, nor for Telephony, SmsManager, ContentCapture, SSLContext or networkSecurityConfig.