fix: Android security hardening + resource leak fixes#44
Open
juliosuas wants to merge 1 commit intoIntent-Lab:mainfrom
Open
fix: Android security hardening + resource leak fixes#44juliosuas wants to merge 1 commit intoIntent-Lab:mainfrom
juliosuas wants to merge 1 commit intoIntent-Lab:mainfrom
Conversation
- Replace usesCleartextTraffic=true with network_security_config.xml that only allows cleartext for local network addresses (OpenClaw LAN) - Fix Timer leak: cancel previous timer before creating new one in GeminiLiveService.connect() - Fix sendExecutor leak: call shutdownNow() in disconnect() - Fix WebRTCClient NPE: replace videoSource!! with safe null check Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Changes
1. Replace
usesCleartextTraffic=truewith network security configAndroidManifest.xmlhadandroid:usesCleartextTraffic="true", allowing all HTTP traffic in plaintext. Replaced with anetwork_security_config.xmlthat only permits cleartext for local network addresses (localhost, 10.x, 192.168.x, 172.16.x) where the OpenClaw gateway typically runs.2. Fix Timer thread leak in GeminiLiveService
Calling
connect()multiple times created new Timer objects without cancelling previous ones. Now cancels the existing timer before creating a new one.3. Fix sendExecutor thread leak
sendExecutor(SingleThreadExecutor) was never shut down indisconnect(). AddedshutdownNow()call.4. Fix WebRTCClient NPE crash
videoSource!!force-unwrap replaced with safe null check (val source = videoSource ?: return).Files Changed
AndroidManifest.xml— network security config referenceres/xml/network_security_config.xml— new, cleartext only for LANgemini/GeminiLiveService.kt— timer + executor fixeswebrtc/WebRTCClient.kt— null safety fixTest plan
🤖 Generated with Claude Code