History log of /bionic/libc/include/sys/system_properties.h
Revision Date Author Comments
cb302f932a3532f1484e1e70894e9b1199384283 20-Apr-2017 Josh Gao <jmgao@google.com> The future is now.

__INTRODUCED_IN_FUTURE -> __INTRODUCED_IN(26)

Bug: http://b/37437368
Test: treehugger
Change-Id: I601a23da83b65a0cd582cc840ed3856a9031b673
a0e5d06c80c4c7cd8ae96e75d6b17c696a97a21d 17-Apr-2017 Elliott Hughes <enh@google.com> 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

(cherry picked from commit 438e01940b90a2b6061a9b9809e08466e1e9faac)

Change-Id: I639f2142ad4ba049b990b13ccccd255be4b4f479
41a3a6f3cf36d626bb8ae474291bda58fc10aba2 17-Feb-2017 Dimitry Ivanov <dimitry@google.com> Hide internal __system_property_* functions

Bug: http://b/34114501
Test: bionic-unit-tests --gtest_filter=prop*
Change-Id: I1fc57b4ced6aaf841aad64e12e7696d25c2e027b
a0d374d587ec18d437d0dd15ba1332aceaa188af 11-Feb-2017 Elliott Hughes <enh@google.com> Add __system_property_wait and return the serial in __system_property_read_callback.

In order to implement android::base::WaitForProperty well, we need a way to
wait not for *any* property to change (__system_property_wait_any), but to
specifically wait for the property represented by a given `prop_info` to
change.

The android::base::WaitForProperty implementation, like attempts to cache
system properties in the past, also needs a way to keep serials and values
in sync, but the existing functions don't provide a cheap way to get a
consistent snapshot. Change the __system_property_read_callback callback's
type to include the serial corresponding to the given value.

Add a test, slightly clean up some of the existing tests (and name them to
include the names of the functions they're testing, in our usual style).

Bug: http://b/35201172
Test: ran tests
Change-Id: Ibc8ebe2e88eef1e333a1bd3dd7f68135f1ba7fb5
d2884916e431373396c0019bf35ef053f57ccc46 24-Jan-2017 Dimitry Ivanov <dimitry@google.com> Revert "Remove limit of system property name length"

This reverts commit 5c1ce278f31bc6fc338b9b951f1adc7c2b343d7c.
Bug: http://b/33926793
Bug: http://b/34670529

Change-Id: I0dc4a8ae55576c69b34b2958d8e664f7066b9c54
(cherry picked from commit 489f58b5eaedd5a80635bb3a7b39e97037c585f6)
16b2a4de143a026b8d467b7d242126adcf67242b 24-Jan-2017 Dimitry Ivanov <dimitry@google.com> Revert "Revert "Remove limit of system property name length""

This reverts commit 489f58b5eaedd5a80635bb3a7b39e97037c585f6.
Bug: http://b/33926793
Bug: http://b/34670529
Test: Run bionic-unit-tests --gtest_filter=prop*

Change-Id: Id4e94652dc2310a21f5b7bd3af098bf79df3f380
489f58b5eaedd5a80635bb3a7b39e97037c585f6 24-Jan-2017 Dimitry Ivanov <dimitry@google.com> Revert "Remove limit of system property name length"

This reverts commit 5c1ce278f31bc6fc338b9b951f1adc7c2b343d7c.
Bug: http://b/33926793
Bug: http://b/34670529

Change-Id: I0dc4a8ae55576c69b34b2958d8e664f7066b9c54
5c1ce278f31bc6fc338b9b951f1adc7c2b343d7c 03-Dec-2015 Dimitry Ivanov <dimitry@google.com> Remove limit of system property name length

This change introduces new __system_property_read_callback
method to use in place of deprecated __system_property_read
__system_property_set() and get() should just work but now
do not have limit on system property names.

Bug: http://b/33926793
Test: boot device, run adb shell propget
Test: boot device with old version of init (protocol v1)
Test: run bionic-unit-tests --gtest_filter=prop*
Change-Id: I619fb5a7e27a272aac30011579665f6160888bc7
581b9f661bc7d32691ac5e5ee8eac38a8807aa09 09-Jan-2017 Dimitry Ivanov <dimitry@google.com> Hide __system_property_add/update, deprecate find_nth

These functions are supposed to be used only by the
property service.

__system_property_find_nth is deprecated and no longer part
of NDK. Call to this function will result in abort for apps
targeting Android O.

Bug: http://b/34114501
Test: bionic-unit-tests --gtest_filter=prop*
Change-Id: I9846965bf248e2ddf45cd7b293618245bbd87145
46b44160e9e4c466be0faf1bb8d6ec70ecc83273 27-May-2016 Josh Gao <jmgao@google.com> Update header versions for NDK platform fixes.

Bug: http://b/28178111
Change-Id: Icd638673b409aa43a91490f77c6b4d79c9ea20d9
14adff1cfa06a3d4d3281a9bf7848b556d84c20d 29-Apr-2016 Josh Gao <jmgao@google.com> Add versioning information to symbols.

Bug: http://b/28178111
Change-Id: I46bf95accd819f4521afb1173d8badcc5e9df31c
c6ff844d75dddfb19fc804b8add2d6a79947b101 13-Feb-2013 Greg Hackmann <ghackmann@google.com> bionic: add __system_property_foreach

find_nth() will be inefficient on a trie. Since find_nth() is only used
internally and only for enumerating properties, we can add a foreach()
function to do this directly.

Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit 577418403d68e663fb33c7b0c8a90d862d9c00cf)

Change-Id: Iaca97d1182ce2c28863ba85241cbb5cf6185eb2f
577418403d68e663fb33c7b0c8a90d862d9c00cf 13-Feb-2013 Greg Hackmann <ghackmann@google.com> bionic: add __system_property_foreach

find_nth() will be inefficient on a trie. Since find_nth() is only used
internally and only for enumerating properties, we can add a foreach()
function to do this directly.

Change-Id: I66bde9926c193073d74b244cce9fffd52108fff8
Signed-off-by: Greg Hackmann <ghackmann@google.com>
0b3c5c50f7bed92282783995bf6a7cc777fa9392 15-Mar-2011 satok <satok@google.com> do not merge. Move property setting from libcutils to bionic.

Backport I110b653a58f3

All the other property stuff is already here. Property setting was
only in libcutils previously to leverage a utility function / constant
or two.

Unfortunately in the process of fixing a race condition we would've
had to do break abstraction boundaries and put some libc-internal
details into libcutils so instead of that we'll just move this
into bionic.

Along with Iee1ca9b7, this now passes:

$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner

Bug: 3511230

Change-Id: I1b588db3344169621e1279ecc0b660cf4e1015d7
ec7e8cc9dddafc624cd28939c1a38ea336c89455 15-Mar-2011 satok <satok@google.com> do not merge. Move property setting from libcutils to bionic.

Backport I110b653a58f3

All the other property stuff is already here. Property setting was
only in libcutils previously to leverage a utility function / constant
or two.

Unfortunately in the process of fixing a race condition we would've
had to do break abstraction boundaries and put some libc-internal
details into libcutils so instead of that we'll just move this
into bionic.

Along with Iee1ca9b7, this now passes:

$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner

Bug: 3511230

Change-Id: I1b588db3344169621e1279ecc0b660cf4e1015d7
4399df8f2ebd797e45bec81e6f22e4911b2c5686 11-Mar-2011 Brad Fitzpatrick <bradfitz@android.com> Move property setting from libcutils to bionic.

All the other property stuff is already here. Property setting was
only in libcutils previously to leverage a utility function / constant
or two.

Unfortunately in the process of fixing a race condition we would've
had to do break abstraction boundaries and put some libc-internal
details into libcutils so instead of that we'll just move this
into bionic.

Along with Iee1ca9b7, this now passes:

$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner

Bug: 3511230
Change-Id: I110b653a58f312fbe069dca59892a877ae9bc911
49f0a8f23bba188466c6ee3652858ef4da228c6f 09-Feb-2010 David 'Digit' Turner <digit@google.com> Fix <sys/epoll.h> and <sys/system_properties.h> to include proper C++ inclusion guards
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution