Conversation
…uthentication state tracking
…ss restarts Fixes #136 and #137. Plain action buttons (#136) WebSocketMessageHandler read the optional "text" field with optString(), which returns "" when the field is absent. performNotificationAction() branched on `replyText != null`, so an absent text was still treated as an inline reply: every plain action button went down the reply path, failed the remoteInputs check and returned false. Any client that omits "text" for non-reply actions could never invoke a button. The guard now tests for a non-empty string, and the handler normalizes an absent field to null. BleTransportBridge also dropped the optional reply text entirely, so inline replies never worked over BLE. It now forwards it, treating empty as "no reply" for consistency with the WebSocket path. Actions after a process restart (#137) activeNotifications was only populated from onNotificationPosted, so after a process restart nothing already in the shade was actionable — clients got "not found" for notifications that were still visible. onListenerConnected() now re-registers what is currently posted. Re-registering alone is not enough: generated IDs embed postTime, and during a session the first-seen ID is preserved across updates via keyToId. Once that in-memory map is gone, regenerating from the current postTime produces a different ID than the one the client holds, so its requests would still miss. The key -> id mapping is therefore persisted (sbn.key is stable across updates and restarts) and consulted when re-registering, so IDs a client obtained before the restart keep resolving. Stale entries are pruned against the currently active notifications on each listener connect. Verified on a Galaxy Z Fold7 (Android 16) against the macOS client: invoking a plain button now reaches pendingIntent.send() and the app-side effect happens, and an ID held by the client before a force-stop is restored identically afterwards. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Upstream
fix(notifications): make action buttons work and keep IDs stable across restarts
fix: assorted bug fixes, QuickShare adjustments, and minor UI updates
…er, and improved connection state handling in tile service.
…WebSocket reconnection process
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.
This pull request introduces several new features and improvements to BLE (Bluetooth Low Energy) connection management, user preferences, and documentation. The most significant changes include enhanced BLE manual disconnect handling, new user preferences for excluding media apps from sync, and improvements to the discovery system. Additionally, the documentation and UI have been updated to reflect new features and permissions.
BLE Connection Management and Manual Disconnect:
sendManualDisconnect()toBleTransportBridgeto notify remote devices of manual disconnects.User Preferences and Media Sync:
DataStoreManagerandAirSyncRepository. UpdatedUiStateto includeexcludedMediaPackages. [1] [2] [3] [4] [5]Discovery System Improvements:
UDPDiscoveryManagertoDiscoveryOrchestratorfor improved modularity and maintainability. [1] [2]Documentation and UI Updates:
README.mdto document new features: cellular network monitoring and enhanced auto-start support for various OEMs.General Code Maintenance:
LocalLifecycleOwnerto use the correct package.versionCodeto 30 inbuild.gradle.kts.These changes collectively improve BLE connection reliability, user customization, and prepare the app for new features and future expansion.