Repository navigation
fix(android): guard network callback cleanup for API 21 - #372
Merged
Merged
Conversation
The first public lint run of 1.5.0-beta.2 failed NewApi at NovaGameDetailActivity.kt:597: getSystemService(Class) needs API 23 while Nova supports API 21. Registration already returns below Android 7.0 and is the only place the callback field is set, so the cleanup never reached that call on older devices, but lint cannot see that invariant. The cleanup now takes and clears the callback as before, then makes the same Android 7.0 check explicit before asking for ConnectivityManager. The callback stays nullable and owned by the activity, and API 21 support, lint settings and the baseline are unchanged. The activity is Android only and is not a Steam Frame build input, so the Frame release guard's RELEASE_ONLY set gains exactly its path. The pinned Frame source, tree, bundle and runtime stay as qualified. The existing readback contract test adds three cases: an activity-only change passes, and a near-name file or another Android source is refused before any release call. Checked: the test's embedded Frame controls pass all 30 cases on this tree and refuse the activity-only case against the previous workflow. Android lint and JUnit were not run locally.
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.
Summary
The first
masterbuild of 1.5.0-beta.2 stopped in Android lint (Lint and unit test):registerNetworkChangeCallbackalready returns below Android 7.0 (API 24), and it is the only placenetworkChangeCallbackis set. Cleanup therefore never reached the typedgetSystemServicecall on older devices, but lint cannot see that field invariant. Cleanup now takes and clears the callback exactly as before, then makes the sameSDK_INT < Ncheck explicit before asking forConnectivityManager.minSdkstays 21. There is no lint suppression,@TargetApi, baseline orlintFailOnErrorchange.Steam Frame alpha. This workflow never builds the Frame bundle. The bundle qualified from
5dd0cf58is attached to the draft release first, and a tag build checks it against pinned digests. That check refuses the tag if any path outsideRELEASE_ONLYchanged since5dd0cf58.clients/deckwith CMake and does not compile it, soRELEASE_ONLYgains exactly this one path.NovaReleaseMetadataTestadds three cases:NovaGameDetailActivity.kt.orig) is refused before any release call;NovaLibraryActivity.kt) is refused before any release call.CHANGELOG.mdand the 1.5.0 release notes are unchanged.Exact candidate
7cc76a2068bb7ccff4b92b280fc7691a53915d9c, tree958017de9563b8fd40620f660973c8f363a68f27masteratbbb8095eefd0dbd6de9412ea1506e92ab0f437aa, the head's parentapp/src/main/java/com/papi/nova/ui/NovaGameDetailActivity.kt(+2),.github/workflows/build.yml(+1),app/src/test/java/com/papi/nova/NovaReleaseMetadataTest.kt(+15/-1)Preserve this commit when merging; do not squash or rebase. The
v1.5.0-beta.2tag will target the exact candidate above.Verification
NovaReleaseMetadataTest, run directly with Python, pass all 30 cases on this tree (27 existing, 3 new). Against the previous workflow, the activity-only case is refused, so the new cases detect the change.git diff --no-renames --name-only 5dd0cf58 7cc76a20lists 14 paths, all inside the newRELEASE_ONLYset.