Skip to content

Respect phone Do Not Disturb for incoming calls#260

Open
alonmln wants to merge 1 commit into
coredevices:masterfrom
alonmln:android-dnd-call-suppression
Open

Respect phone Do Not Disturb for incoming calls#260
alonmln wants to merge 1 commit into
coredevices:masterfrom
alonmln:android-dnd-call-suppression

Conversation

@alonmln

@alonmln alonmln commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Extends the existing "Respect Phone Do Not Disturb" setting so it also applies to incoming phone calls, not only regular notifications.

When Android Do Not Disturb is active and the setting is enabled, incoming calls are only forwarded to the watch if Android's notification ranking says the call is allowed by the phone's DND policy. If no matching call ranking is available in time, the call is conservatively suppressed from the watch.

Details

  • Adds call-specific DND filtering based on Android notification ranking.
  • Applies the filtering in both call paths:
    • Telecom InCallService
    • legacy phone-state receiver fallback
  • Coordinates InCallService ownership so the legacy receiver does not reclaim a call while DND ranking is pending.
  • Correlates rankings to the current call using notification caller fields, with tolerant phone-number/name matching.
  • Updates the settings copy to clarify that the setting covers notifications and calls.

Testing

  • ./gradlew :libpebble3:testDebugUnitTest --tests io.rebble.libpebblecommon.calls.CallDoNotDisturbFilterTest
  • ./gradlew testDebugUnitTest
  • ./gradlew :composeApp:assembleDebug
  • Manually installed and tested a debug build on a Samsung Galaxy S26 / Android 16.
  • Verified that with "Respect Phone Do Not Disturb" enabled and phone DND active, blocked incoming calls no longer vibrate/show on the watch.
  • Verified that the feature works after enabling the setting in the app.

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