Skip to content

Refactor VPN Permission Handling (Android 14+) - #16

Closed
zerox80 wants to merge 1 commit into
TrustTunnel:masterfrom
zerox80:refactor/vpn-prepare
Closed

Refactor VPN Permission Handling (Android 14+)#16
zerox80 wants to merge 1 commit into
TrustTunnel:masterfrom
zerox80:refactor/vpn-prepare

Conversation

@zerox80

@zerox80 zerox80 commented Jan 26, 2026

Copy link
Copy Markdown

Refactor VPN Permission Handling (Android 14+)

Description

Updates VpnPrepareActivity to use the modern AndroidX Activity Result API (registerForActivityResult) instead of the deprecated startActivityForResult. This also improves compatibility with Android 13/14 for notification permissions.

Changes

  • VpnPrepareActivity.kt: Rewritten to use ActivityResultContracts.
  • AndroidManifest.xml / libs.versions.toml: Added necessary dependencies.

Justification

"changes to deprecated classes".
Modernizing the code to avoid deprecated APIs ensures better long-term maintenance and compatibility with newer Android versions.

How to test

  1. Uninstall app (to reset permissions).
  2. Install and click "Connect".
  3. Verify VPN permission dialog appears and works.
  4. Verify Notification permission prompt (on Android 13+).

ialexbond added a commit to ialexbond/TrustTunnelClientForWindows that referenced this pull request Apr 20, 2026
TrustTunnel#14 font-semibold → token (24 файла):
- Все font-semibold в components/ заменены на font-[var(--font-weight-semibold)]
- Единый источник правды для font-weight через дизайн-токены

TrustTunnel#15 input font-size consistency (4 файла):
- ActionInput, ActionPasswordInput, NumberInput, Select: text-base → text-sm
- Все input-компоненты теперь единообразно используют 12px (text-sm)

TrustTunnel#16 colors.ts удалён (16 файлов):
- Все 16 импортов colors.ts мигрированы на CSS-токены:
  successBg → var(--color-status-connected-bg)
  warningBg → var(--color-status-connecting-bg)
  dangerBg → var(--color-status-error-bg)
  dropdownShadow → var(--shadow-lg)
  *Glow → "none" (deprecated)
  accent* → inline rgba (нет токенов)
- gui-app/src/shared/ui/colors.ts удалён

TrustTunnel#17 hardcoded rgba():
- Ключевые rgba() заменены на CSS-токены в рамках миграции colors.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
adguard-octobuddy Bot pushed a commit that referenced this pull request Jun 9, 2026
@anyakushin

Copy link
Copy Markdown
Collaborator

Hello, @zerox80, thanks for your effort and sorry for a long delay.

These changes requires a big cleanup - some things are unrelated to the PR's description and solved problem, even some essential links are changed.

Moreover, please open the issue for discussion first. Because this is a very minor problem but with a relatively big diff and reviewing such changes could take significant time. So this might not be accepted even after cleaning up the PR.

I'll close this for now, still it at least requires a big cleanup and these changes should be discussed first

@anyakushin anyakushin closed this Jul 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.

2 participants