emanuele-f / PCAPdroid

No-root network monitor, firewall and PCAP dumper for Android
https://emanuele-f.github.io/PCAPdroid
GNU General Public License v3.0
2.08k stars 260 forks source link

Replace HashSet with ArraySet #401

Open emanuele-f opened 5 months ago

emanuele-f commented 5 months ago

Using HashSet is not appropriate for small sets like the one used in VpnExemptionsActivity, AppsTogglesAdapter, etc, as it wastes ram. An ArraySet or similar should be used instead.

Note: ArraySet is not available in API 21, so a wrapper class should probably be created