Repository navigation
fix: let an empty setActivationMethods list turn the activation methods off - #48
Open
boehlerlukas wants to merge 1 commit into
Open
boehlerlukas wants to merge 1 commit into
boehlerlukas wants to merge 1 commit into
Conversation
…ds off Gleap.setActivationMethods(activationMethods: []) passed an empty array to the native SDKs, which read it as "use the dashboard settings" (iOS GleapActivationMethodHelper useAutoActivationMethods, Android when the config loads again). So shake / screenshot could not be turned off from code. The bridges now pass NONE for an empty list, which both native SDKs treat as none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this fixes
Help-center audit finding 25: Flutter apps could not turn the activation methods off from code.
Gleap.setActivationMethods(activationMethods: [])passed an empty array to the native SDKs, and both read an empty array as "use the dashboard settings":GleapActivationMethodHelper useAutoActivationMethodsis true while the list is empty, soGleapConfigHelperfills it fromactivationMethodShake/activationMethodScreenshotGesture.GleapDetectorUtil.initDetectors).Both native SDKs treat
NONEon its own as "none". The iOS and Android bridges now sendNONEwhen the list is empty, so[]means no shake and no screenshot gesture. The dartdoc says so. This needs no native SDK change and works with the 19.3.0 natives.Verified
flutter analyze lib: No issues found.flutter test: All tests passed (21).flutter build apk --debug(example): built, so the Android bridge compiles againstgleap-android-sdk19.3.0.flutter build ios --simulator --debug --no-codesign(example) fails here with an uncategorized Xcode error (exit 255). It fails the same way with this PR's iOS change reverted, so it is the local Xcode 27 toolchain, not this change. The iOS change is 3 lines using the existingNONEenum value.Not fixed (needs decision / out of scope)
maskViewAPI (finding 26 is fixed natively in Gleap-iOS-SDK#60 and Android-SDK#55). A Flutter-level mask (by widget key or rect) is a product decision.🤖 Generated with Claude Code