Skip to content

Fix Android quick actions and Windows taskbar activation - #2272

Open
Treewinds wants to merge 2 commits into
chen08209:devfrom
Treewinds:codex/fix-platform-launch-dev
Open

Fix Android quick actions and Windows taskbar activation#2272
Treewinds wants to merge 2 commits into
chen08209:devfrom
Treewinds:codex/fix-platform-launch-dev

Conversation

@Treewinds

Copy link
Copy Markdown

Summary

Fixes two platform-specific launch and activation issues:

  • Android Quick Settings actions could show a toast without actually starting or stopping the service.
  • On Windows, clicking the pinned taskbar icon could not restore an already-running hidden FlClash window.

Root cause

Android

The tile plugin sent the action to Dart without waiting for a result. When the Flutter engine existed but the tile listener was not ready, the action was silently dropped.

Windows

The application did not implement single-instance activation. Clicking the pinned icon launched another process, but that process could not notify the existing hidden window to show itself.

Changes

Android

  • Wait for the Dart tile handler to return its result.
  • Fall back to the native service path when Dart does not handle the action.
  • Keep the quick-action activity alive until the asynchronous action finishes.
  • Report whether the Dart-side start or stop operation was handled successfully.

Windows

  • Add a named mutex to enforce a single application instance.
  • Send a registered activation message to the existing window.
  • Forward the activation event through window_ext.
  • Show the hidden FlClash window when the activation event is received.
  • Use a FlClash-specific Win32 window class name.

Validation

  • Dart static analysis passed with no issues.
  • Android release Kotlin compilation passed.
  • Windows window_ext plugin and runner compiled successfully with MSVC:
    • 0 warnings
    • 0 errors
  • git diff --check passed.

chen08209 and others added 2 commits July 30, 2026 10:37
@chen08209
chen08209 force-pushed the dev branch 12 times, most recently from 997defd to fce973e Compare August 8, 2026 00:47
@chen08209
chen08209 force-pushed the dev branch 8 times, most recently from 8179499 to d966b18 Compare August 15, 2026 11:41
@chen08209
chen08209 force-pushed the dev branch 7 times, most recently from 7748c64 to e17fe6d Compare September 1, 2026 01:44
@chen08209
chen08209 force-pushed the dev branch 6 times, most recently from 5ea6bbb to 5a524cd Compare September 7, 2026 02:48
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