Add a method to OatFileAssistantContext to fetch all information.
artd can be multi-threaded, so it needs OatFileAssistantContext to be
thread-safe. This CL adds `OatFileAssistantContext::FetchAll`, which
fetches all information and makes subsequent operations read-only. artd
calls it the first time it initalizes OatFileAssistantContext.
Bug: 229268202
Test: adb shell pm art get-optimization-status \
com.google.android.youtube
Ignore-AOSP-First: Contains internal only changes. Will cherry-pick the
AOSP part later.
Change-Id: Iacc36655e2cdbc7cb74b3f3cbf7f9ac1a1ffc28e
6 files changed