[MS41.1] Prepare for APIs for querying usage with template

This CL includes:
1. Prepare for queryDetailsForDevice which allows callers
   to query history of networks that matches the given template.
2. Prepare for queryDetailsForUidTagState, which allows
   callers to query history uid stats with the given template,
   uid and other conditions.
3. Enforce fine location permission if the caller is querying
   data usage with a template which contains wifi network keys.

Test: atest NetworkStatsServiceTest NetworkStatsManagerTest
Bug: 204830222
Bug: 200768422
Change-Id: I6783d6bfd6e075e0b3ec8a3c91836377f1d71c7a
4 files changed
tree: e234c69f6098cea24a718d9c8c0e63f3f9c13e99
  1. core/
  2. framework/
  3. framework-t/
  4. service-t/
  5. services/
  6. tests/