Skip to content

Remove INTERNET and ACCESS_NETWORK_STATE from the libre APK - #65

Merged
MaxDac merged 6 commits into
mainfrom
remove-network-permissions
Nov 4, 2026
Merged

MaxDac merged 6 commits into
mainfrom
remove-network-permissions

Conversation

@MaxDac

@MaxDac MaxDac commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Closes #64

Summary

  • :app strips INTERNET and ACCESS_NETWORK_STATE with tools:node="remove"; :app-shared's manifest is unchanged, so MarkNotes Plus keeps both.
  • MainActivity.watchNetwork() returns early unless SyncManager.canWatchNetwork (providers non-empty), independent of the Sync when reconnected setting, so upgraders from 0.1.x cannot hit a SecurityException.
  • scripts/check-release-apk.py now expects only USE_BIOMETRIC and the AndroidX receiver permission; docs and the F-Droid MR copies updated.
  • New instrumented test: launches with the reconnect setting on and asserts both permissions are denied.

Parity impact

  • None: Android-only change

MarkNotes Plus is unaffected; it picks this up on its next libre/ bump.

Checklist

  • ktlintCheck detekt lintDebug testDebugUnitTest :core:test assembleDebug pass locally; release APK aapt2 dump permissions lists only the two expected entries
  • Instrumented tests: not run locally (WayDroid device unauthorized); left to CI

🤖 Generated with Claude Code

MaxDac and others added 4 commits November 3, 2026 15:04
Strip both permissions in :app only (MarkNotes Plus keeps them via :app-shared)
and skip the network callback when no provider exists, so launch cannot throw
a SecurityException even if 'Sync when reconnected' is still on.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MaxDac MaxDac closed this Nov 4, 2026
@MaxDac MaxDac reopened this Nov 4, 2026
MaxDac and others added 2 commits November 4, 2026 12:35
main moved sync behind SyncHooks, so the libre app never observes network
state; the SyncManager guard and its test are replaced by a permissions test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MaxDac
MaxDac merged commit 63fcc70 into main Nov 4, 2026
13 checks passed
@MaxDac
MaxDac deleted the remove-network-permissions branch November 4, 2026 13:27
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.

Remove INTERNET and ACCESS_NETWORK_STATE from the libre APK

1 participant