feat(#416): support Android 16 (API 36) - #437
Open
binokaryg wants to merge 5 commits into
Open
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Robolectric 4.16 dropped emulation of SDK < 23, so the LSmsSender tests force Build.VERSION.SDK_INT instead of @config(sdk = 22). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Android 16 ignores orientation locks on large screens and the Play Store flags them. The predictive back opt-out keeps onBackPressed() working when targeting SDK 36. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
binokaryg
marked this pull request as ready for review
August 6, 2026 04:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #416
Description
Targets Android 16 (API 36) ahead of Google Play's Aug 31, 2026 target API deadline, and addresses the Play Store's large-screen recommendation by removing the portrait orientation locks.
Toolchain
compileSdk/targetSdkVersion35 → 36.compileSdk 36requires AGP ≥ 8.9.1, the rollback couldn't stay. Workaround: ABI splits are now disabled automatically whenever abundle*task is invoked. Safe here because CI and the Makefile always runassembleandbundleas separate Gradle invocations.Manifest
android:screenOrientation="portrait"from all nine activities (flagged by the Play Store). Android 16 ignores these locks on large screens anyway.configChanges="orientation|screenSize"is kept so rotation does not recreate activities — notably the webview is not reloaded on rotate.android:enableOnBackInvokedCallback="false". Targeting SDK 36 enables predictive back by default, which silently stopsonBackPressed()from being called — breaking the webview back-navigation JS bridge (EmbeddedBrowserActivity),SettingsDialogActivity, andClosableAppActivity. The opt-out preserves current behavior; migrating toOnBackInvokedCallbackcan be a follow-up issue.Tests
mockito-inline5.2.0 withmockito-core5.23.0 (the old ByteBuddy cannot instrument classes alongside Robolectric 4.16; inline mocks are the default since Mockito 5).LSmsSendertests now forceBuild.VERSION.SDK_INT = 22viaReflectionHelpersinstead of@Config(sdk = 22). The pre-M code path is still shipped (minSdkVersion 21) and still tested.Testing
assembleUnbrandedDebugproduces both ABI-split APKs;bundleUnbrandedRelease— the exact task that failed in bug: app bundling fails with current gradle version #422 — builds successfully.onBackPressed()(confirmed in logcat) — the predictive-back opt-out works when targeting SDK 36.Notes for reviewers
setRequestedOrientationgated by screen size) — flagging for discussion.angular.element(document.body).injector().get('AndroidApi').v1.back()) throwsangular is not definedon CHT 4.x. This is pre-existing on all Android versions and probably deserves its own issue.AI Disclosure
This PR was written primarily by Claude Code (Claude Fable 5), working interactively under my direction: it investigated the #422 rollback and the AGP bundling bug, made the Gradle/manifest/test changes, and ran the verification (unit tests, lint/static analysis, APK and bundle builds, and manual testing on an Android 16 emulator against a CHT 4.x instance). I reviewed the changes, chose the approach at each decision point (AGP workaround, predictive-back opt-out, incremental commits), and did the final review of this description.