[LayoutInflater] Use precompiled layouts if available
This change enables the use of precompiled layouts, provided a couple of
conditions are met:
1. Precompiled layouts are enabled by the system property
view.use_precompiled_layouts.
2. There is a file called compiled_view.dex in the application's code cache
directory.
If these conditions are met, when a layout is inflated, the LayoutInflater will
first check if a precompiled version is available and use that. If anything goes
wrong, such as if the layout is not available or something goes wrong during the
inflation process, then the LayoutInflater will fall back on interpretting the
layout resource as before.
Bug: 111895153
Test: atest $ANDROID_BUILD_TOP/cts/tests/tests/view/src/android/view/cts/LayoutInflaterTest.java
Change-Id: Id050072c0206080322a0e876782ee2b66d03916d
1 file changed