Hi guys,
With my Mi 10 Ultra on MIUI 13 I noticed that when I allowed phone calls from starred contacts in DND I got messages notifications too, and there was no way to disable messages and chat notifications. In fact the only one option is for phone calls. And this behavior has been reported for 13 ultra too, in the first MIUI builds at least.
I examined the configuration and noted that there were 2 flags in notification-policy.xml file in zen tag, that are "messages" and "convos", both set to true that made messages and chats notifications to bypass DND, and MIUI interface has no option to explicitly set these flags.
So I wrote a magisk module which changes these flags to false and so now I got no more notification for messages from starred contacts in DND. The module is made of just a single script executed at boot that patches notification-policy.xml. You can delete the module after the first successful execution, since the new values stick. I keep it installed, just to make sure that flags stay on false in case they get back to true somehow.
Please notice that this module changes "messages" and "convos" value to false, indipendently from other flags value. So messages and chats won't bother you anymore in DND, indipendently if you allow calls from anyone or from starred contacts only.
To restore the flags value to true, you can use the Enable module. Please notice that you can have installed only one module (disable or enable), and not both at the same time.
I adapted the module to the current notification policy syntax as of June 2023.
Please notice that the module is super safe as it patches notification-policy only if it finds expected flags at expected offset, so you can use it safely: at most it won't do anything.
UPDATE 2023/08/18:
* Anyway the module is provided as it is, with no support. If you make changes, please give credit *
Tested on MIUI 13/14 stable MI 10 Ultra and MIUI 14 stable Xiaomi 13 Ultra.
With my Mi 10 Ultra on MIUI 13 I noticed that when I allowed phone calls from starred contacts in DND I got messages notifications too, and there was no way to disable messages and chat notifications. In fact the only one option is for phone calls. And this behavior has been reported for 13 ultra too, in the first MIUI builds at least.
I examined the configuration and noted that there were 2 flags in notification-policy.xml file in zen tag, that are "messages" and "convos", both set to true that made messages and chats notifications to bypass DND, and MIUI interface has no option to explicitly set these flags.
So I wrote a magisk module which changes these flags to false and so now I got no more notification for messages from starred contacts in DND. The module is made of just a single script executed at boot that patches notification-policy.xml. You can delete the module after the first successful execution, since the new values stick. I keep it installed, just to make sure that flags stay on false in case they get back to true somehow.
Please notice that this module changes "messages" and "convos" value to false, indipendently from other flags value. So messages and chats won't bother you anymore in DND, indipendently if you allow calls from anyone or from starred contacts only.
To restore the flags value to true, you can use the Enable module. Please notice that you can have installed only one module (disable or enable), and not both at the same time.
I adapted the module to the current notification policy syntax as of June 2023.
Please notice that the module is super safe as it patches notification-policy only if it finds expected flags at expected offset, so you can use it safely: at most it won't do anything.
UPDATE 2023/08/18:
Code:
Uploaded enable volume whiche restores true value.
Added check during module install that the other module is not installed: you can have only enable or disable module at the same time.
* Anyway the module is provided as it is, with no support. If you make changes, please give credit *
Tested on MIUI 13/14 stable MI 10 Ultra and MIUI 14 stable Xiaomi 13 Ultra.
Attachments
Last edited: