属性服务
2. c:
在/system/core/init中
可#include "property_service.h"
property_set("bootanimation.over","1");
3. 其它的C/C++程序中:
/frameworks/base/cmds/bootanimation/bootanimation_main.cpp
#include <cutils/properties.h>
system/core/include/cutils/properties.h:
/* property_get: returns the length of the value which will never be
** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
** (the length does not include the terminating zero).
**
** If the property read fails or returns an empty value, the default
** value is used (if nonnull).
*/
int property_get(const char *key, char *value, const char *default_value);
/* property_set: returns 0 on success, < 0 on
1. java: SystemProperties.set("ctl.start","shutdownanim");
2. c:
在/system/core/init中
可#include "property_service.h"
property_set("bootanimation.over","1");
3. 其它的C/C++程序中:
/frameworks/base/cmds/bootanimation/bootanimation_main.cpp
#include <cutils/properties.h>
system/core/include/cutils/properties.h:
/* property_get: returns the length of the value which will never be
** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
** (the length does not include the terminating zero).
**
** If the property read fails or returns an empty value, the default
** value is used (if nonnull).
*/
int property_get(const char *key, char *value, const char *default_value);
/* property_set: returns 0 on success, < 0 on