Commit Graph

3 Commits

Author SHA1 Message Date
Ken Chen
9e1865e48e Reference DataSaver setting from BPF map on V+ only
Only reference DataSaverEnabled map on V+ platform because the
information in map before platform V is not time-precise. See comment in
this commit for detail.

Bug: 288340533
Test: presubmit
Change-Id: I0795e88e6006e6d24d27b63c31d0e3ed81d0262c
2023-12-08 02:42:51 +00:00
Ken Chen
006a3f1514 Support Data Saver awareness in libcom.android.tethering.dns_helper.so
Make ADnsHelper_isUidNetworkingBlocked() to reference 'metered'
information and Data Saver related BPF maps to make the final decision.

Bug: 288340533
Test: atest dns_helper_unit_test
Change-Id: I51b1dadd56a8d6fda3f8b18d64740e52b76e1bfe
2023-11-01 06:23:09 +08:00
Ken Chen
ec0f7ac36f Add a library for DNS resolver to read bpf maps
The library provides an init function and an API for DNS resolver to
query whether the application is allowed to send DNS query based on BPF
maps settings.

Bug: 288340533
Test: atest dns_helper_unit_test (with test CL)
Change-Id: Ibfb383bfb074da2104a25aa4f04ebc32b22d11da
2023-11-01 06:23:04 +08:00