fix(android): correct legacy mock detection and avoid redundant lookups - #366
Open
OskarEichler wants to merge 1 commit into
Open
fix(android): correct legacy mock detection and avoid redundant lookups#366OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
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.
Fixes and reductions
Compatibility
No permission, visibility scope, public signature, or detection list is added/removed. Pre-23 mock-location results intentionally change to the correct enabled/disabled meaning. ADB diagnostic logging is removed; the return value is unchanged.
Verification
An inline JavaCompiler harness compiles and executes the actual source with instrumented Android stubs: null/0/1 changes from false/true/false to false/false/true; ADB settings reads drop from two to one; the representative four-app scan performs one permission lookup instead of four. Positive/negative mock and hook cases pass, and all 23 unique suspicious package names remain detectable. No app-wide latency benchmark or device-detection guarantee is claimed.
Type declarations and whitespace checks pass. Combined consumer fixes on RN 0.87.1: both Android Debug flavors, both iOS simulator Debug schemes, and four release-mode Metro bundles pass. No test files changed. The upstream test command is only a placeholder; no old Android physical-device run was performed.