Fix issue for DnsResolver#query

1. Previously, getDnsNetId doesn't handle all the cases.
Fix it with cosidering bypass private DNS flag.
2. Make getDnsNetId return Network instead of netId,
and change name from getDnsNetId to getDnsNetwork

Bug: 129530368
Test: atest DnsResolverTest DnsUtilsTest
Change-Id: Ic8d45b802d72a266f9ec97bfea620c1ede6967e5
3 files changed
tree: 69622b63e984fd31963964479d28711e9a8cf181
  1. core/
  2. services/
  3. tests/