Make ApexPreinstalledData a singleton class
Storing state in a global variable inside a namespace is prone to
errors, and doesn't provide a clean api. Given that there are several
different entities that would like/already are to mount apexes, it's
time to add a cleaner api for them to use.
ApexPreinstalledData is now a non-copyable and non-moveable singletone,
with some documentation on how it's expected to be used. This is a first
cl in a sequence that tries to do a small cleanup of apexd codebase. :)
Test: presubmit
Test: atest ApexTestCases
Bug: 165948777
Change-Id: Icb26e4a7f6ed08c3702223a173ccfc399069b5d5
Merged-In: Icb26e4a7f6ed08c3702223a173ccfc399069b5d5
(cherry picked from commit 645d612e4c6fd2d3ac6e1acb6b71713cdaceb5f2)
9 files changed