summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Junyu Lai <junyulai@google.com> 2022-01-19 08:33:21 +0000
committer junyulai <junyulai@google.com> 2022-01-22 01:01:49 +0800
commitde9cf3392d7872c2bee69b65a614e77bb166b26e (patch)
treea2f9480fcf000b41aafbec28815e540dd72aeebf /libs/androidfw/StringPool.cpp
parent139e007dc5ce4e7e82bc7bf4fbdef52f6d6d4d37 (diff)
[MS66] Initialize TrafficStats with context
TrafficStats has static methods created in API level 8 that need access to NetworkStatsManager but doesn't take a context. Previously this was achieved by using ServiceManager, but with TrafficStats moving to the connectivity module, this is no longer possible. Instead, make sure TrafficStats has an appropriate context by the time any client code can call the relevant methods. • In app code, this achieved by passing the application context from ActivityThread#handleBindApplication, before any app code can run. • In the system server, this is achieved by passing the context right after creating service. Test: atest TrafficStatsTest CtsWebkitTestCases Bug: 204830222 Change-Id: I251bb8a4431ad12ff61929879ef1363cf06b9244
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions