Is the Firewall api broken?
I'm developing an app that uses the Firewall API. The flow of the add rules procedure in my application is:
- Receive a list of domains to be blocked from our web application
- Remove any old rules that might be set already in the Firewall
- Create and add DomainFilterRules for all browsers installed on device
- Enable the Firewall with:
It's all fine and dandy and works as expected. The issue comes when I disable the firewall. According to the API rules are not enforced anymore if you call enableFirewall passing false as parameter:
So I'd expect the rules to not be enforced anymore and the browsers packages are allowed to access any desired domain but that's not what happens. The firewall is indeed disabled (isFirewallEnabled() returns false) but the rules are still enforced in the native Samsung Browser and Firefox. They are not enforced in Chrome. As a workaround I added a method to remove all firewall rules before disabling it, which shouldnt't be needed.
Is the API broken? It's definitely not working as expected.