Skip to content

fix(call): match mute/unmute keywords as whole words - #408

Open
noelpatata wants to merge 1 commit into
D4vidDf:dev/0_6_0from
noelpatata:fix/call-mute-keyword-match
Open

noelpatata wants to merge 1 commit into
D4vidDf:dev/0_6_0from
noelpatata:fix/call-mute-keyword-match

Conversation

@noelpatata

Copy link
Copy Markdown
Contributor

CallNotificationClassifier.matchesActionKeyword checked startsWith(" ") / endsWith(" ") instead of the keyword, so:

  • only an exact Mute label was recognised: multi-word labels like "Mute microphone" or "Tap to mute" were never a microphone control, so the connected-controls-transition to ACTIVE couldn't fire for apps that label it that way
  • any action label with a leading/trailing space was read as Mute/Unmute

Now the keyword is matched as a whole word anywhere in the label ("Unmute" still never matches mute).

Might be part of the "stuck on Calling" reports (#387, #226), but I can't confirm without the real Instagram/Messenger action labels, so not marking them as fixed.

Tests: 3 new (fail on the old code), full suite 422/422, assembleDebug OK.

🤖 Generated with Claude Code

matchesActionKeyword compared the title against " " instead of the keyword,
so only an exact "Mute" label counted: multi-word labels such as
"Mute microphone" were never a microphone control (no connected-controls
transition to ACTIVE), and any label with a leading or trailing space was
read as Mute/Unmute. Match the keyword as a whole word anywhere in the title;
"Unmute" still never matches "mute".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.

1 participant