OSDN Git Service

Add installd logic for compiling secondary dex files
authorCalin Juravle <calin@google.com>
Tue, 17 Jan 2017 22:43:25 +0000 (14:43 -0800)
committerCalin Juravle <calin@google.com>
Thu, 2 Mar 2017 21:05:50 +0000 (13:05 -0800)
commit80a2125b85eaa0916daea7e90b016fe4f1b59924
tree4bf03a74c79a23eb813db4f4247aeee4afb85531
parent73d5aef51e00cab54adcea671eacab64234a55f8
Add installd logic for compiling secondary dex files

Secondary dex compilation takes almost the same path as primary apk
compilation.

The main difference is in the fact that for secondary dex files we
create the oat dir on the fly and execute dexoptanalyzer (the equivalent
of GetDexOptNeeded) to check if we really need to perform the
compilation.

Test: adb shell cmd package compile -f -m speed --secondary-dex com.google.android.gms
Bug: 32871170

(cherry picked from commit 42451c029b0e87990e5833daea2286bb12c21df5)

Change-Id: Ie5efe6eccc6b8c91ca7bd7c9e680aa7288d79ae8

Merged-In: I2c56d57322899968a338ccabffca575d66f8ee08
cmds/installd/InstalldNativeService.cpp
cmds/installd/dexopt.cpp
cmds/installd/dexopt.h
cmds/installd/installd_constants.h
cmds/installd/utils.cpp
cmds/installd/utils.h