SetDndModeTool
Sets the Do Not Disturb interruption filter.
Calls android.app.NotificationManager.setInterruptionFilter. Requires DND policy access (isNotificationPolicyAccessGranted), a special access granted via Settings > Apps > Special access > Do Not Disturb access; without it the tool returns an error. Idempotent (setting the same mode twice has the same effect).
Android 15+ (API 35): for apps targeting API 35, setInterruptionFilter no longer changes the global DND state directly — it activates/deactivates the calling app's implicit AutomaticZenRule. The system merges that rule with the user's own settings and other apps' rules, so the resulting global filter may differ from the one requested (e.g. requesting off cannot override DND the user turned on). The tool therefore reads back NotificationManager.getCurrentInterruptionFilter after the call and reports it as actual_mode; applied is true only when it matches the requested mode, and note explains any mismatch.
Output keys: success, mode (requested), actual_mode (off/priority/alarms/none/ unknown), applied, note (present only when the actual mode differs).