OSDN Git Service

AAPT: Handle gaps in resources when building splits
authorAdam Lesinski <adamlesinski@google.com>
Tue, 16 Aug 2016 01:45:00 +0000 (18:45 -0700)
committerAdam Lesinski <adamlesinski@google.com>
Wed, 17 Aug 2016 19:53:01 +0000 (19:53 +0000)
commit26ae640c348eb12e2273887280970cd53675a032
tree550cfad11c8b50571e3a435b7bb0e8e515eaed64
parent97632afe5ecb0c35366167e3dfd0aa6258ab276f
AAPT: Handle gaps in resources when building splits

Due to public ID assignment, gaps in resource type and entry
IDs can occur. This can lead to null pointer dereferencing
if not careful. This happened in ResourceTable::getDensityVaryingResources()
which is called when building Splits.

Bug:30879690
Change-Id: I588e4dcd2e042fccfcb2e87967b5cbd0d23b4497
(cherry picked from commit 081d1b4cf602fdd7302b597e6bf902cb415bc3a8)
tools/aapt/ResourceTable.cpp