Move class static variables to function static

Chrome bans use of static initializers. As a result we can't roll
libdexfile changes into Chromium.
This CL moves static class members DexFile::g_lock and
DexFile::g_mapped_dex_files into the static function
DexFile::CreateFromDisk(the only user of those
static class members).

  - Build `chrome/android:monochrome_static_initializers` successfully

Bug: 1365904
Change-Id: Ibfe96c18e1747c2483db0b2f0a39b4918c809298
Reviewed-by: Tushar Agarwal <>
Reviewed-by: Mike Wittman <>
4 files changed