summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorNg Zhi An <zhin@google.com>2019-01-24 13:45:57 -0800
committerZhi An Ng <zhin@google.com>2019-02-11 17:03:02 +0000
commit8094880025d0680ec4cf586929d85b9050d4e9d6 (patch)
tree69442555902ce14f5ad6684ede9a9f4c3783671a /tools/aapt2/java/JavaClassGenerator_test.cpp
parent4dbab056a2d7bc5eb446d46da138c871e89dfae7 (diff)
Do not load xml metadata for unchanged packages in RegisteredServicesCache
RegisteredServicesCache caches services in an xml, so the system doesn't have to scan all the apks. Whenever a package is changed (add/remove/replaced), the broadcast receiver in RegisteredServicesCache will refresh this cache by quering all matching services and reading their xml metadata. There is extra work done here, because only the changed package will have services added/removed. The edge case is after a cache is invalidated, we want to query package manager for everything, regardless of what changedUids is (we could have arrived here if invalidateCache is called, and then a package change event fires, before a getAllServices is called to rescan everything). Add a new test to verify that the optimization takes care of the case when the cache is invalidated. Bug: 117755076 Bug: 122912184 Test: atest RegisteredServicesCache Test: dumpsys content # check sync adapters Merged-In: I5c1f57108c4b67d24b198000d57216c63d35290a Change-Id: I5c1f57108c4b67d24b198000d57216c63d35290a
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions