Repository navigation
feat(pigeon): DownloadNotifications 迁移到 channel 模式 - #83
Merged
Merged
Conversation
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.
Part of #70. Closes #82.
概要
DownloadNotifications 从手写 MethodChannel 迁移到 Pigeon channel 模式(Android-only),旧通道保留 fallback。
tool/pigeon/download_notifications.dart(start(StartRequest)/update(UpdateRequest)/stop(id))download_notifications.g.dart+ KotlinDownloadNotificationsApi.g.kt;errorClassName避免和 widget / DownloadsPublisher 重复FlutterErrorDownloadNotificationsImpl(@Keep,applicationContext)委托现有DownloadNotifications对象;MainActivity注册 Pigeon,旧通道 handler 保留download_notifications_adapter.dart封装 Pigeon transport;PigeonFirstDownloadNotifications在 data 层组合 fallback;非 Android 保持 Noop验证
flutter analyze --no-pub:0 issueflutter test --no-pub:3545 通过docs check:OKdownload_notifications_pigeon_test.dart3 项通过(Pigeon start/update/stop、旧通道 fallback、工厂默认路径)ClassNotFoundException/NoSuchMethodError/AndroidRuntime崩溃;apkanalyzer 确认生成类保留说明 / 边界
int→ KotlinLong→toInt():与旧通道的 32 位进度字段一致;超大文件(>2GB)进度仍沿用旧限制。release.yml/ widget / DownloadsPublisher;旧通道保留。