Repository navigation
Live notification tap opens that provider's usage - #170
Open
BenItBuhner wants to merge 1 commit into
Open
BenItBuhner wants to merge 1 commit into
BenItBuhner wants to merge 1 commit into
Conversation
The Now Bar live notification's contentIntent opened MainActivity with no provider extra, no data URI and a fixed request code (8614), so a tap landed on whichever provider tab was last selected. Each provider's tap now carries EXTRA_PROVIDER plus a codexmeter://usage/<id> URI and a per-provider request code (PendingIntent identity ignores extras). MainActivity resolves the provider from the extra or URI on cold start (onCreate) and warm start (onNewIntent), then clears both so onResume can't re-route. Reset alerts route the same way (Claude saved-reset opens Claude Code). Adds NotificationRoutes (pure Java) with self-tests.
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.
Cause
NowBarManagerbuilt the live notification's tap intent with no provider extra, no data URI and a fixed request code (8614), so a tap landed on whichever provider tab was last selected. Reset alerts had the same problem.Fix
EXTRA_PROVIDERplus acodexmeter://usage/<id>URI and a per-provider request code (PendingIntent identity ignores extras).MainActivityresolves the provider from the extra or URI on cold start (onCreate) and warm start (onNewIntent), then clears both soonResumecan't re-route.NotificationRouteshelper with self-tests (wired intorun-tests.sh).Testing
android/run-tests.shpasses.