summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Dave Mankoff <mankoff@google.com> 2024-04-19 18:11:58 +0000
committer Dave Mankoff <mankoff@google.com> 2024-04-19 18:20:16 +0000
commit4de0b2c938760b07cb3f8361cb135f54da9dac71 (patch)
tree972e311569087553940dbb05c1620dae98e33674 /libs/androidfw/StringPool.cpp
parent24caa927c47471027f45c195a1a4eb99d57a63c9 (diff)
Change CoreStartable @Dependencies to Injected Map
Using it as an annotation wasn't working - the compiler was stripping it away for unknown reasons. Replace it with a injected Map<Class, Set<Class>> where each startable can simply provide a set of the other startables it cares about. One advantage of this is that the dependencies can not be provided in the same module where the startable is bound. This means that different impls of a given startable can list different dependencies. Before, the dependencies were tied to the key, which could be an interface shared across multiple different impls. The reason this was done this way instead of a method on CoreStartable is because we want to be able to get the list of dependencies before constructing the startable - many of our classes do work in the constructor. We could have tried to reflectively call a static method on the key, but this would look like an ugly hack; it would also prevent the advantage of specifying the dependencies on a per-impl basis. Bug: 333758389 Flag: NA Test: locally run Change-Id: If729483c4661428d4a1041f84f39cdc50f6f5645
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions