Backport: Fix the side channel attack by using async DnsResolver API with FLAG_NO_CACHE_STORE

Before this CL, FLAG_NO_CACHE_STORE could be used to perform side
channel attack. Because this flag ensures the result is never
added to the cache, but will return a cached response if one exists.
So make FLAG_NO_CACHE_STORE imply FLAG_NO_CACHE_LOOKUP to block the
possibility of side channel attacking.

Bug: 150371903
Test: atest
Because DnsResolver had been moved to another git project in R,
use aosp/1302595 as Merged-In tag to avoid conflict.
Merged-In: I1ff2dc09f41f76973c5f066b07b15388e722b375

Change-Id: Ic0ef9b22bb5992b083bebc4f530acd63a02ac31c
2 files changed