OSDN Git Service

libandroidfw: Revert null check in ApplyStyle
authorAdam Lesinski <adamlesinski@google.com>
Fri, 6 Jan 2017 01:03:55 +0000 (17:03 -0800)
committerAdam Lesinski <adamlesinski@google.com>
Sat, 7 Jan 2017 00:51:48 +0000 (16:51 -0800)
commit06d3e8fec7e2b29f99d755bee849023d88957953
tree328055c7a9632e9660e836d4dfd0cfcc0450700e
parent0a454c39cb5bc03cd646546aa3b8baaed1962178
libandroidfw: Revert null check in ApplyStyle

The out parameter `out_indices` is expected to be non-null
and so the extra null check adds a cost to performance
and opens the door to misusing the API by not supplying
`out_indices`.

Test: make libandroidfw_tests
Change-Id: Ie66fd837c5e24ec2838156e7b67f54c15cd27933
libs/androidfw/AttributeResolution.cpp
libs/androidfw/include/androidfw/AttributeResolution.h
libs/androidfw/tests/AttributeResolution_test.cpp