ScoredNetworkNominator: Pass through a hardcoded attribution tag.
This permits the network nominator package to properly separate
this noted op from other location accesses it may perform.
This pattern is a little unusual in that system assigns an
attribution tag on behalf of an app (vs having the app specify a
tag via a context or a direct API). This is because the way this
code is structured, the server performs a note-op check before
any interaction with the target app. If the app was to specify a tag,
it would have to be via INetworkRecommendationProvider and that's
one way (for good reason), which means this is racy. The only
non-racy way to supply a tag is during setActiveScorer where we
can possibly read a tag from a manifest attribute associated with the
service definition. That seems like overkill so this may be a
pragmatic solution (aka hack) that serves us well in the interim.
(cherry picked from commit ba94708939cc28cecb762c3d805b5566bb78e3b9)
Test: atest ScoredNetworkNominatorTest; manual
Bug: 161443749
Merged-In: Iac5d02dea5751cfbca5ec1cf5d72b3320516f817
Change-Id: Iac5d02dea5751cfbca5ec1cf5d72b3320516f817
2 files changed