OSDN Git Service

AAPT2: Split APK by ABI.
authorShane Farmer <safarmer@google.com>
Mon, 19 Jun 2017 19:52:04 +0000 (12:52 -0700)
committerShane Farmer <safarmer@google.com>
Wed, 21 Jun 2017 21:10:23 +0000 (14:10 -0700)
commit5766943f558c8fccc714bb3d0a96af70816a5545
treefb4cf8d223e103b930e217432e8579675a02b356
parentc10f9d81f849b883eb72663bb62d344ce70a3e1e
AAPT2: Split APK by ABI.

Added a FilterChain that can apply multiple filter steps to an APK file
as it is being written to disk. The first filter applied is by ABI. If
a library in the APK does not match the filter it is skipped.

Added an AbiFilter that keeps files that are either not native libs or
are for the set of wanted ABIs

Test: ran unit tests locally
Test: ran against an APK with ARM and x68 libs and diffed the results

Change-Id: I3fb901d3de3513e85f2a2763a8e4487a28ed4881
12 files changed:
tools/aapt2/Android.bp
tools/aapt2/LoadedApk.cpp
tools/aapt2/LoadedApk.h
tools/aapt2/cmd/Optimize.cpp
tools/aapt2/configuration/ConfigurationParser.cpp
tools/aapt2/configuration/ConfigurationParser.h
tools/aapt2/configuration/ConfigurationParser_test.cpp
tools/aapt2/filter/AbiFilter.cpp [new file with mode: 0644]
tools/aapt2/filter/AbiFilter.h [new file with mode: 0644]
tools/aapt2/filter/AbiFilter_test.cpp [new file with mode: 0644]
tools/aapt2/filter/Filter.h [new file with mode: 0644]
tools/aapt2/filter/Filter_test.cpp [new file with mode: 0644]