diff options
| author | Victor Khimenko <khim@google.com> | 2017-02-28 21:15:42 +0100 |
|---|---|---|
| committer | Victor Khimenko <khim@google.com> | 2017-02-28 21:22:14 +0100 |
| commit | 5038189fffb867bf977221ffc871dd9db9d2f4f4 (patch) | |
| tree | 30ed87b6fc9f5010e4af578f3878ab3c91e2108c | |
| parent | 5076d453e7d88c358d56d5bd7b9c1fd0c9c4c694 (diff) | |
| download | platform_libnativehelper-5038189fffb867bf977221ffc871dd9db9d2f4f4.tar.gz platform_libnativehelper-5038189fffb867bf977221ffc871dd9db9d2f4f4.tar.bz2 platform_libnativehelper-5038189fffb867bf977221ffc871dd9db9d2f4f4.zip | |
Stop using __system_property_area__
Apparently that "backdoor" is no longer needed - the proper way is
to reinitialize properties:
https://android-review.googlesource.com/#/c/181794/24/tests/system_properties_test.cpp
Test: refactoring CL, existsing tests still pass
BUG=21852512
Change-Id: I2fe193d65a0e6804bfc15726d9b973a97b378fef
| -rw-r--r-- | tests/JniInvocation_test.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/JniInvocation_test.cpp b/tests/JniInvocation_test.cpp index 186b74e..7a73c70 100644 --- a/tests/JniInvocation_test.cpp +++ b/tests/JniInvocation_test.cpp @@ -37,8 +37,6 @@ #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ #include <sys/_system_properties.h> -extern void *__system_property_area__; - struct LocalPropertyTestState { LocalPropertyTestState() : valid(false) { const char* ANDROID_DATA = getenv("ANDROID_DATA"); @@ -51,9 +49,6 @@ struct LocalPropertyTestState { return; } - old_pa = __system_property_area__; - __system_property_area__ = NULL; - pa_dirname = dirname; pa_filename = pa_dirname + "/__properties__"; @@ -67,9 +62,8 @@ struct LocalPropertyTestState { return; } - __system_property_area__ = old_pa; - __system_property_set_filename(PROP_FILENAME); + __system_properties_init(); unlink(pa_filename.c_str()); rmdir(pa_dirname.c_str()); } @@ -78,7 +72,6 @@ public: private: std::string pa_dirname; std::string pa_filename; - void *old_pa; }; #endif |
