-
-
Notifications
You must be signed in to change notification settings - Fork 5
Add HTA-side implementation of sync-interrupted scenario (HT-508). Also replace deprecated AsyncTask. #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wmergenthal
wants to merge
12
commits into
sillsdev:master
Choose a base branch
from
wmergenthal:sync-cancel-added-asynctask-replaced
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+200
−40
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5f52643
Handle both 'sync_success' and 'sync_interrupted' statuses from HT in…
wmergenthal fd35b08
HT-508: finish HTA-side implementation of sync-interrupted scenario. …
wmergenthal 3727d83
Sync final status extracted from HT's notification with greater clarity
wmergenthal 399e532
Handle case when HTA does not understand sync final status from HT
wmergenthal 678cd7c
Safety checkin: clearer status extract, add watchdog and debug output
wmergenthal 00f8cb0
Safety commit: watchdog works, debug info shows sync activities
wmergenthal a875cf3
watchdog: start and stop in better ways
wmergenthal fd78761
Ungray the Continue button upon watchdog timeout
wmergenthal f743ece
Change sync status 'interrupted' to 'canceled'
wmergenthal fc89607
Prep for PR update: remove or disable all debug output
wmergenthal fed5646
Fix 10 issues flagged by devin-bot
wmergenthal 08ab9e0
Remove unnecessary setProgress() call
wmergenthal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Backward-incompatible: older HearThis desktop without query params triggers false sync_error
When an older HearThis desktop (pre-HT-508) sends
POST /notify HTTP/1.1without any query parameters, the newAcceptNotificationHandler.handle()code setsstatus = "sync_error"and shows the user an error message even though sync actually completed successfully.Detailed Explanation
The old
AcceptNotificationHandler.handle()unconditionally calledlistener.onNotification("")and responded with"success"for all notifications. The oldSyncActivity.onNotification()unconditionally showed "Sync completed successfully!".With the new code at
AcceptNotificationHandler.java:57-83:uri.getQuery()returnsnullfor/notify(no query string)statusremainsnullstatus = "sync_error""sync_error"→ user sees "Sync timed out or had some other error. Please try again."This means any user running the updated HearThisAndroid app with an older HearThis desktop will always see a sync error, even on a perfectly successful sync. The fallback for missing query parameters should be
"sync_success"(or at minimum not"sync_error") to maintain backward compatibility.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.