Skip to content

DroidGuard: fix version offset for first build variant - #3816

Open
paulcakeface wants to merge 1 commit into
microg:masterfrom
paulcakeface:paul/versionutil-index-zero
Open

paulcakeface wants to merge 1 commit into
microg:masterfrom
paulcakeface:paul/versionutil-index-zero

Conversation

@paulcakeface

Copy link
Copy Markdown

Summary

Fix VersionUtil.getVersionOffset() rejecting valid build-map entries when the third component is the first item in its list.

indexOf() returns 0 for that first valid entry, but the existing third-index check required > 0. The two preceding index checks already correctly accept zero. This changes the third check to >= 0 and adds regression coverage for valid first-entry variants plus an unknown-entry control.

Validation

Base: current upstream master at 4c74e5acb79479004428be755547432294639878.

  • Regression test on unmodified production code: acceptsFirstDpiEntry fails because getVersionOffset("000300") returns null.
  • Same unchanged regression test after the one-character production fix: PASS.
  • :play-services-droidguard-core:testDebugUnitTest: PASS.
  • :play-services-droidguard-core:testReleaseUnitTest: PASS.
  • :play-services-droidguard-core:lintRelease: PASS.
  • :play-services-core:assembleMapboxDefaultRelease: PASS (BUILD SUCCESSFUL in 13m 1s, 3241 tasks).

This is a pure build-map calculation fix; no device behaviour or protocol path is changed.

woahwhattheheck added a commit to woahwhattheheck/GmsCore that referenced this pull request Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant