OSDN Git Service

Un-deprecated __system_property_find_nth.
authorElliott Hughes <enh@google.com>
Mon, 17 Apr 2017 21:53:07 +0000 (14:53 -0700)
committerElliott Hughes <enh@google.com>
Mon, 17 Apr 2017 21:53:07 +0000 (14:53 -0700)
commit438e01940b90a2b6061a9b9809e08466e1e9faac
tree4889c190b65be3636ee5d638db7822624abcd412
parente4e69a174a0b4980eaff49c55c39b476cbe9b73e
Un-deprecated __system_property_find_nth.

Netflix was using this, and looking the header file, although
__system_property_find_nth has been available since the beginning of time,
__system_property_foreach only appeared in 16. So anyone who wants to run
on pre-JellyBean devices would want to use __system_property_find_nth.

It's pretty much a one-liner in terms of __system_property_foreach anyway,
so it doesn't cost us anything to keep it.

Also restore slightly better tests than we originally removed.

Bug: http://b/36566667
Test: ran tests
Change-Id: Id268c2c2e848da17bb0a5a5420af234d9dcb829a
libc/bionic/system_properties.cpp
libc/include/sys/system_properties.h
tests/system_properties_test.cpp